Class: Fog::Compute::StormOnDemand::Server
- Inherits:
-
Fog::Compute::Server
- Object
- Model
- 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.
Attributes inherited from Fog::Compute::Server
#private_key, #private_key_path, #public_key, #public_key_path, #username
Attributes inherited from Model
Instance Method Summary collapse
- #clone(options) ⇒ Object
- #create(options) ⇒ Object
- #destroy ⇒ Object
-
#initialize(attributes = {}) ⇒ Server
constructor
A new instance of Server.
- #ready? ⇒ Boolean
- #reboot ⇒ Object
- #resize(options) ⇒ Object
Methods inherited from Fog::Compute::Server
#scp, #scp_download, #ssh, #ssh_port, #sshable?
Methods inherited from Model
#inspect, #reload, #symbolize_keys, #to_json, #wait_for
Methods included from Attributes::ClassMethods
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
Methods included from Attributes::InstanceMethods
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #requires, #requires_one
Constructor Details
#initialize(attributes = {}) ⇒ Server
Returns a new instance of Server.
31 32 33 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 31 def initialize(attributes={}) super end |
Instance Attribute Details
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
29 30 31 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 29 def password=(value) @password = value end |
Instance Method Details
#clone(options) ⇒ Object
56 57 58 59 60 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 56 def clone() requires :identity connection.clone_server({:uniq_id => identity}.merge!()) true end |
#create(options) ⇒ Object
35 36 37 38 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 35 def create() data = connection.create_server().body['servers'] load(data) end |
#destroy ⇒ Object
40 41 42 43 44 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 40 def destroy requires :identity connection.delete_server(:uniq_id => identity) true end |
#ready? ⇒ Boolean
46 47 48 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 46 def ready? active == 1 end |
#reboot ⇒ Object
50 51 52 53 54 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 50 def reboot requires :identity connection.reboot_server(:uniq_id => identity) true end |
#resize(options) ⇒ Object
61 62 63 64 65 |
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 61 def resize() requires :identity connection.resize_server({:uniq_id => identity}.merge!()) true end |