Sha256: 42751a752a6e167517941db776db543406b042ef189144d249dc32a3109632c6

Contents?: true

Size: 578 Bytes

Versions: 11

Compression:

Stored size: 578 Bytes

Contents

require 'fog/core/collection'
require 'fog/rackspace/models/compute_v2/attachment'

module Fog
  module Compute
    class RackspaceV2
      class Attachments < Fog::Collection

        model Fog::Compute::RackspaceV2::Attachment

        attr_accessor :server

        def all
          data = connection.list_attachments(server.id).body['volumeAttachments']
          load(data)
        end

        def get(volume_id)
          data = connection.get_attachment(server.id, volume_id).body['volumeAttachment']
          data && new(data)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-nirvanix-1.8.1 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-parser-fix-1.6.1 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-test-again-1.6.0 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-parser-fix-1.6.0 lib/fog/rackspace/models/compute_v2/attachments.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/rackspace/models/compute_v2/attachments.rb
fog-sgonyea-1.8.1 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-1.8.0 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-1.7.0 lib/fog/rackspace/models/compute_v2/attachments.rb
fog-1.6.0 lib/fog/rackspace/models/compute_v2/attachments.rb