Sha256: 2a48454caf8fdf660cdc947702ab10fff6081738786de025da0b705ee79f4850

Contents?: true

Size: 632 Bytes

Versions: 9

Compression:

Stored size: 632 Bytes

Contents

require 'fog/vcloud/terremark/ecloud/models/node'

module Fog
  class Vcloud
    module Terremark
      class Ecloud

        class Nodes < Fog::Vcloud::Collection

          model Fog::Vcloud::Terremark::Ecloud::Node

          attribute :href, :aliases => :Href

          def all
            if data = connection.get_nodes(href).body[:NodeService]
              load(data)
            end
          end

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

        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
fog-0.3.16 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.15 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.14 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.13 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.12 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.11 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.10 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.9 lib/fog/vcloud/terremark/ecloud/models/nodes.rb
fog-0.3.8 lib/fog/vcloud/terremark/ecloud/models/nodes.rb