Class: Fog::Compute::Ninefold::Servers

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/ninefold/models/compute/servers.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) all



12
13
14
15
# File 'lib/fog/ninefold/models/compute/servers.rb', line 12

def all
  data = service.list_virtual_machines
  load(data)
end

- (Object) get(identifier)



17
18
19
20
21
22
23
24
25
# File 'lib/fog/ninefold/models/compute/servers.rb', line 17

def get(identifier)
  return nil if identifier.nil? || identifier == ""
  data = service.list_virtual_machines(:id => identifier)
  if data.empty?
    nil
  else
    new(data[0])
  end
end