class Fog::Compute::Fifo::Servers
Public Instance Methods
all()
click to toggle source
# File lib/fog/fifo/models/compute/servers.rb, line 11 def all service.list_vms().body.map{|id| get(id) } end
bootstrap(new_attributes = {})
click to toggle source
# File lib/fog/fifo/models/compute/servers.rb, line 22 def bootstrap(new_attributes = {}) server = create(new_attributes) server.wait_for { ready? } server end
create(params = {})
click to toggle source
# File lib/fog/fifo/models/compute/servers.rb, line 15 def create(params = {}) resp = service.create_vm(params) #This will retrn a 303 with location = new vm url, so just get it. get(resp.headers['location'].split('/').last) end
get(machine_id)
click to toggle source
# File lib/fog/fifo/models/compute/servers.rb, line 28 def get(machine_id) data = service.get_vm(machine_id).body new(data) end