Class: Fog::Compute::CloudAtCost::Server
- Inherits:
-
Server
- Object
- Server
- Fog::Compute::CloudAtCost::Server
- Defined in:
- lib/fog/cloudatcost/models/server.rb
Instance Method Summary collapse
- #console ⇒ Object
- #destroy ⇒ Object
- #new_instance? ⇒ Boolean
- #power_off ⇒ Object
- #power_on ⇒ Object
- #rename_server(name) ⇒ Object
- #reset ⇒ Object
- #reverse_dns(hostname) ⇒ Object
- #run_mode(mode) ⇒ Object
- #save ⇒ Object
- #save! ⇒ Object
Instance Method Details
#console ⇒ Object
82 83 84 |
# File 'lib/fog/cloudatcost/models/server.rb', line 82 def console perform_action :console end |
#destroy ⇒ Object
54 55 56 |
# File 'lib/fog/cloudatcost/models/server.rb', line 54 def destroy perform_action :delete_server end |
#new_instance? ⇒ Boolean
40 41 42 |
# File 'lib/fog/cloudatcost/models/server.rb', line 40 def new_instance? !persisted? end |
#power_off ⇒ Object
62 63 64 |
# File 'lib/fog/cloudatcost/models/server.rb', line 62 def power_off perform_action :power_off end |
#power_on ⇒ Object
58 59 60 |
# File 'lib/fog/cloudatcost/models/server.rb', line 58 def power_on perform_action :power_on end |
#rename_server(name) ⇒ Object
74 75 76 |
# File 'lib/fog/cloudatcost/models/server.rb', line 74 def rename_server(name) perform_action :rename_server, name end |
#reset ⇒ Object
66 67 68 |
# File 'lib/fog/cloudatcost/models/server.rb', line 66 def reset perform_action :reset end |
#reverse_dns(hostname) ⇒ Object
78 79 80 |
# File 'lib/fog/cloudatcost/models/server.rb', line 78 def reverse_dns(hostname) perform_action :reverse_dns, hostname end |
#run_mode(mode) ⇒ Object
70 71 72 |
# File 'lib/fog/cloudatcost/models/server.rb', line 70 def run_mode(mode) perform_action :run_mode, mode end |
#save ⇒ Object
44 45 46 47 |
# File 'lib/fog/cloudatcost/models/server.rb', line 44 def save raise Fog::Errors::Error, 'Re-saving an existing object may create a duplicate' if persisted? save! end |
#save! ⇒ Object
49 50 51 52 |
# File 'lib/fog/cloudatcost/models/server.rb', line 49 def save! requires :cpu, :ram, :storage, :template_id service.create_server(cpu, ram, storage, template_id) end |