class Fog::Compute::Cloudstack::Servers

Public Instance Methods

all() click to toggle source
# File lib/fog/cloudstack/models/compute/servers.rb, line 12
def all
  data = connection.list_virtual_machines["listvirtualmachinesresponse"]["virtualmachine"] || []
  load(data)
end
bootstrap(new_attributes = {}) click to toggle source
# File lib/fog/cloudstack/models/compute/servers.rb, line 17
def bootstrap(new_attributes = {})
  server = create(new_attributes)
  server.wait_for { ready? }
  server
end
get(server_id) click to toggle source
# File lib/fog/cloudstack/models/compute/servers.rb, line 23
def get(server_id)
  if server = connection.list_virtual_machines('id' => server_id)["listvirtualmachinesresponse"]["virtualmachine"].first
    new(server)
  end
rescue Fog::Compute::Cloudstack::BadRequest
  nil
end