Class: Fog::Compute::StormOnDemand::Server
Instance Attribute Summary collapse
#private_key, #private_key_path, #public_key, #public_key_path, #ssh_port, #username
Attributes inherited from Model
#collection, #service
Instance Method Summary
collapse
#scp, #scp_download, #ssh, #sshable?
Methods inherited from Model
#inspect, #reload, #symbolize_keys, #to_json, #wait_for
#_load, #aliases, #attribute, #attributes, #identity, #ignore_attributes, #ignored_attributes
#connection, #connection=, #prepare_service_value
#_dump, #attributes, #dup, #identity, #identity=, #merge_attributes, #new_record?, #persisted?, #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
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
51
52
53
54
55
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 51
def clone(options)
requires :identity
service.clone_server({:uniq_id => identity}.merge!(options))
true
end
|
#destroy ⇒ Object
35
36
37
38
39
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 35
def destroy
requires :identity
service.delete_server(:uniq_id => identity)
true
end
|
#history(options = {}) ⇒ Object
63
64
65
66
67
68
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 63
def history(options={})
requires :identity
params = {:uniq_id => identity}.merge!(options)
res = service.server_history(params).body
res['items']
end
|
#ready? ⇒ Boolean
41
42
43
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 41
def ready?
active == 1
end
|
#reboot(options = {}) ⇒ Object
45
46
47
48
49
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 45
def reboot(options={})
requires :identity
service.reboot_server({:uniq_id => identity}.merge!(options))
true
end
|
#resize(options) ⇒ Object
57
58
59
60
61
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 57
def resize(options)
requires :identity
service.resize_server({:uniq_id => identity}.merge!(options))
true
end
|
#shutdown(options = {}) ⇒ Object
70
71
72
73
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 70
def shutdown(options={})
requires :identity
service.shutdown_server({:uniq_id => identity}.merge!(options)).body
end
|
#start ⇒ Object
75
76
77
78
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 75
def start
reqwuires :identity
service.start_server({:uniq_id => identity}).body
end
|
#status ⇒ Object
80
81
82
83
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 80
def status
requires :identity
service.server_status({:uniq_id => identity}).body
end
|
#update(options) ⇒ Object
85
86
87
88
|
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 85
def update(options)
requires :identity
service.update_server({:uniq_id => identity}.merge!(options)).body
end
|