Sha256: dcb2f12623ee208f8124cbecf692a4f8c6003e15f4d68d07d8e3dadceaa281c9

Contents?: true

Size: 535 Bytes

Versions: 67

Compression:

Stored size: 535 Bytes

Contents

require 'fog/core/collection'
require 'fog/xenserver/models/compute/vdi'

module Fog
  module Compute
    class XenServer

      class Vdis < Fog::Collection

        model Fog::Compute::XenServer::VDI

        def all(options = {})
          data = service.get_records 'VDI'
          load(data)
        end

        def get( vdi_ref )
          if vdi_ref && vdi = service.get_record( vdi_ref, 'VDI' )
            new(vdi)
          end
        rescue Fog::XenServer::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

67 entries across 67 versions & 7 rubygems

Version Path
fog-1.10.1 lib/fog/xenserver/models/compute/vdis.rb
fog-test-me-1.10.0 lib/fog/xenserver/models/compute/vdis.rb
fog-1.10.0 lib/fog/xenserver/models/compute/vdis.rb
fog-1.9.0 lib/fog/xenserver/models/compute/vdis.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/xenserver/models/compute/vdis.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/xenserver/models/compute/vdis.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/xenserver/models/compute/vdis.rb