Sha256: ad520a6cfef1d75265602a28dc1395ed0ce96491a80cd6e8ff00759010bc6dc3

Contents?: true

Size: 547 Bytes

Versions: 65

Compression:

Stored size: 547 Bytes

Contents

require 'fog/vcloud/models/compute/vapp'

module Fog
  module Vcloud
    class Compute

      class Vapps < Collection

        model Fog::Vcloud::Compute::Vapp

        undef_method :create

        attribute :href

        def all
          load([service.get_vdc(service.default_vdc_href).resource_entities].flatten.select { |re| re[:type] == "application/vnd.vmware.vcloud.vApp+xml" })
        end

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

      end
    end
  end
end

Version data entries

65 entries across 65 versions & 6 rubygems

Version Path
fog-1.10.0 lib/fog/vcloud/models/compute/vapps.rb
fog-1.9.0 lib/fog/vcloud/models/compute/vapps.rb
fog-maestrodev-1.8.0.20130114204828 lib/fog/vcloud/models/compute/vapps.rb
fog-maestrodev-1.8.0.20130111070250 lib/fog/vcloud/models/compute/vapps.rb
fog-maestrodev-1.8.0.20130109172219 lib/fog/vcloud/models/compute/vapps.rb