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-maestrodev-1.18.0.20131209090811 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/vcloud/models/compute/vdcs.rb
gapinc-fog-1.12.1.2.1 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/vcloud/models/compute/vdcs.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.18.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.17.0 lib/fog/vcloud/models/compute/vdcs.rb
fog-1.16.0 lib/fog/vcloud/models/compute/vdcs.rb