class Fog::Compute::Ecloud::Nodes

Public Instance Methods

all() click to toggle source
# File lib/fog/ecloud/models/compute/nodes.rb, line 12
def all
  data = connection.get_nodes(href).body
  if data[:NodeServices]
    load(data[:NodeServices][:NodeService])
  else
    load([])
  end
end
create(options) click to toggle source
# File lib/fog/ecloud/models/compute/nodes.rb, line 29
def create(options)
  options[:uri] = "/cloudapi/ecloud/nodeServices/internetServices/#{internet_service_id}/action/createNodeService"
  options[:protocol] ||= "TCP"
  options[:enabled] ||= true
  options[:description] ||= ""
  data = connection.node_service_create(options).body
  object = new(data)
end
get(uri) click to toggle source
# File lib/fog/ecloud/models/compute/nodes.rb, line 21
def get(uri)
  if data = connection.get_node(uri)
    new(data.body)
  end
rescue Fog::Errors::NotFound
  nil
end
internet_service_id() click to toggle source
# File lib/fog/ecloud/models/compute/nodes.rb, line 38
def internet_service_id
  href.scan(%r\d+/)[0]
end