Class: Fog::Compute::StormOnDemand::Server
- Inherits:
-
Fog::Compute::Server
- Object
- Fog::Compute::Server
- Fog::Compute::StormOnDemand::Server
- Defined in:
- lib/fog/storm_on_demand/models/compute/server.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
writeonly
Sets the attribute password.
Instance Method Summary collapse
- #clone(options) ⇒ Object
- #destroy ⇒ Object
- #history(options = {}) ⇒ Object
-
#initialize(attributes = {}) ⇒ Server
constructor
A new instance of Server.
- #ready? ⇒ Boolean
- #reboot(options = {}) ⇒ Object
- #resize(options) ⇒ Object
- #shutdown(options = {}) ⇒ Object
- #start ⇒ Object
- #status ⇒ Object
- #update(options) ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Server
Returns a new instance of Server.
30 31 32 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 30 def initialize(attributes={}) super end |
Instance Attribute Details
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
28 29 30 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 28 def password=(value) @password = value end |
Instance Method Details
#clone(options) ⇒ Object
50 51 52 53 54 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 50 def clone() requires :identity service.clone_server({:uniq_id => identity}.merge!()) true end |
#destroy ⇒ Object
34 35 36 37 38 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 34 def destroy requires :identity service.delete_server(:uniq_id => identity) true end |
#history(options = {}) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 62 def history(={}) requires :identity params = {:uniq_id => identity}.merge!() res = service.server_history(params).body res['items'] end |
#ready? ⇒ Boolean
40 41 42 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 40 def ready? active == 1 end |
#reboot(options = {}) ⇒ Object
44 45 46 47 48 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 44 def reboot(={}) requires :identity service.reboot_server({:uniq_id => identity}.merge!()) true end |
#resize(options) ⇒ Object
56 57 58 59 60 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 56 def resize() requires :identity service.resize_server({:uniq_id => identity}.merge!()) true end |
#shutdown(options = {}) ⇒ Object
69 70 71 72 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 69 def shutdown(={}) requires :identity service.shutdown_server({:uniq_id => identity}.merge!()).body end |
#start ⇒ Object
74 75 76 77 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 74 def start reqwuires :identity service.start_server({:uniq_id => identity}).body end |
#status ⇒ Object
79 80 81 82 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 79 def status requires :identity service.server_status({:uniq_id => identity}).body end |
#update(options) ⇒ Object
84 85 86 87 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 84 def update() requires :identity service.update_server({:uniq_id => identity}.merge!()).body end |