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-1.15.0 lib/fog/vcloud/models/compute/tags.rb
gapinc-fog-1.14.0 lib/fog/vcloud/models/compute/tags.rb
fog-maestrodev-1.14.0.20130806165225 lib/fog/vcloud/models/compute/tags.rb
fog-1.14.0 lib/fog/vcloud/models/compute/tags.rb
fog-1.13.0 lib/fog/vcloud/models/compute/tags.rb
gapinc-fog-1.12.1.2 lib/fog/vcloud/models/compute/tags.rb
gapinc-fog-1.12.1.1 lib/fog/vcloud/models/compute/tags.rb
gapinc-fog-1.12.1a lib/fog/vcloud/models/compute/tags.rb
gapinc-fog-1.12.1 lib/fog/vcloud/models/compute/tags.rb
fog-1.12.1 lib/fog/vcloud/models/compute/tags.rb
fog-1.12.0 lib/fog/vcloud/models/compute/tags.rb