Class: Fog::Compute::Joyent::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Joyent::Servers
- Defined in:
- lib/fog/joyent/models/compute/servers.rb
Instance Method Summary collapse
- #all ⇒ Object
- #bootstrap(new_attributes = {}) ⇒ Object
- #create(params = {}) ⇒ Object
- #get(machine_id) ⇒ Object
Instance Method Details
#all ⇒ Object
10 11 12 |
# File 'lib/fog/joyent/models/compute/servers.rb', line 10 def all load(service.list_machines().body) end |
#bootstrap(new_attributes = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/fog/joyent/models/compute/servers.rb', line 20 def bootstrap(new_attributes = {}) server = create(new_attributes) server.wait_for { ready? } server end |
#create(params = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/fog/joyent/models/compute/servers.rb', line 14 def create(params = {}) data = service.create_machine(params).body server = new(data) server end |
#get(machine_id) ⇒ Object
26 27 28 29 30 31 |
# File 'lib/fog/joyent/models/compute/servers.rb', line 26 def get(machine_id) data = service.get_machine(machine_id).body server = new(data) server. = server. if server..nil? server end |