Sha256: 8f45f89b51de07702371ffe3f0cdbd7dd1df28a74deec7f44eb9aacc359f0d7c

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 Bytes

Contents

require File.expand_path("../tag", __FILE__)

module Fog
  module Compute
    class Ecloud
      class Tags < Fog::Ecloud::Collection
        identity :href

        model Fog::Compute::Ecloud::Tag

        def all
          data = service.get_tags(href).body[:DeviceTag]
          load(data)
        end

        def get(uri)
          if data = service.get_tag(uri)
            new(data.body)
          end
        rescue ServiceError => e
          raise e unless e.status_code == 404
          nil
        end
      end
    end
  end
end

Version data entries

4 entries across 2 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/tags.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/tags.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/tags.rb
fog-ecloud-0.3.0 lib/fog/compute/ecloud/models/tags.rb