Sha256: 72007af182f193aaaa413545725f23e688739c1806353d8e39fd467b3a32667e

Contents?: true

Size: 615 Bytes

Versions: 17

Compression:

Stored size: 615 Bytes

Contents

module Fog
  class Vcloud
    module Terremark
      class Ecloud

        class Catalog < Fog::Vcloud::Collection

          model Fog::Vcloud::Terremark::Ecloud::CatalogItem

          attribute :href, :aliases => :Href

          def all
            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
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fog-0.3.16 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.15 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.14 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.13 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.12 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.11 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.10 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.9 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.8 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.7 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.6 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.5 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.4 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.3 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.2 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.1 lib/fog/vcloud/terremark/ecloud/models/catalog.rb
fog-0.3.0 lib/fog/vcloud/terremark/ecloud/models/catalog.rb