Sha256: 80f3f48912a082cb4eb63c46a084373f32de71e633389d6e1bd323124ec86944

Contents?: true

Size: 661 Bytes

Versions: 51

Compression:

Stored size: 661 Bytes

Contents

require 'fog/vcloud/models/compute/tag'

module Fog
  module Vcloud
    class Compute

      class Tags < Fog::Vcloud::Collection

        undef_method :create

        model Fog::Vcloud::Compute::Tag

        attribute :href, :aliases => :Href

        def all
          metadata = service.get_metadata(self.href)
          load(metadata.body[:MetadataEntry]) if metadata.body[:MetadataEntry]
        end

        def get(uri)
          service.get_metadata(uri)
        rescue Fog::Errors::NotFound
          nil
        end
        
        def create(opts)
          service.configure_metadata(opts.merge(href: href))
        end
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 3 rubygems

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