Sha256: f9497c974ad8d2d904088597257c62c12a46e0b95f82ed583f5cc18c08b0350d

Contents?: true

Size: 728 Bytes

Versions: 65

Compression:

Stored size: 728 Bytes

Contents

require 'fog/vcloud/models/compute/vdc'

module Fog
  module Vcloud
    class Compute

      class Vdcs < Collection

        model Fog::Vcloud::Compute::Vdc

        undef_method :create

        attribute :href

        def all
          data = service.get_organization(org_uri).links.select { |link| link[:type] == "application/vnd.vmware.vcloud.vdc+xml" }
          data.each { |link| link.delete_if { |key, value| [:rel].include?(key) } }
          load(data)
        end

        def get(uri)
          service.get_vdc(uri)
        rescue Fog::Errors::NotFound
          nil
        end

        private

        def org_uri
          self.href ||= service.default_organization_uri
        end
      end
    end
  end
end

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-1.22.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.21.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.20.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.19.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/vcloud/models/compute/vdcs.rb