Sha256: 52e6178c72aa1c5e8b05e65884ae3e18414863850a6d0c70e443acd69578c750

Contents?: true

Size: 563 Bytes

Versions: 7

Compression:

Stored size: 563 Bytes

Contents

module Fog
  module Ecloud
    class Compute
      class Catalog < Fog::Ecloud::Collection

        model Fog::Ecloud::Compute::CatalogItem

        attribute :href, :aliases => :Href

        def all
          check_href!
          if data = connection.get_catalog(href).body[:CatalogItems][:CatalogItem]
            load(data)
          end
        end

        def get(uri)
          if data = connection.get_catalog_item(uri)
            new(data.body)
          end
        rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/compute/models/ecloud/catalog.rb
fog-0.8.1 lib/fog/compute/models/ecloud/catalog.rb
fog-0.8.0 lib/fog/compute/models/ecloud/catalog.rb
fog-0.7.2 lib/fog/compute/models/ecloud/catalog.rb
fog-0.7.1 lib/fog/compute/models/ecloud/catalog.rb
fog-0.7.0 lib/fog/compute/models/ecloud/catalog.rb
fog-0.6.0 lib/fog/compute/models/ecloud/catalog.rb