Class: Fog::Compute::StormOnDemand::Server

Inherits:
Fog::Compute::Server
  • Object
show all
Defined in:
lib/fog/compute/storm_on_demand/models/server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#password=(value) ⇒ Object (writeonly)

Sets the attribute password

Parameters:

  • value

    the value to set the attribute password to.



28
29
30
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 28

def password=(value)
  @password = value
end

Instance Method Details

#clone(options) ⇒ Object



46
47
48
49
50
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 46

def clone(options)
  requires :identity
  service.clone_server({:uniq_id => identity}.merge!(options))
  true
end

#destroyObject



30
31
32
33
34
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 30

def destroy
  requires :identity
  service.delete_server(:uniq_id => identity)
  true
end

#history(options = {}) ⇒ Object



58
59
60
61
62
63
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 58

def history(options = {})
  requires :identity
  params = {:uniq_id => identity}.merge!(options)
  res = service.server_history(params).body
  res["items"]
end

#ready?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 36

def ready?
  active == 1
end

#reboot(options = {}) ⇒ Object



40
41
42
43
44
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 40

def reboot(options = {})
  requires :identity
  service.reboot_server({:uniq_id => identity}.merge!(options))
  true
end

#resize(options) ⇒ Object



52
53
54
55
56
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 52

def resize(options)
  requires :identity
  service.resize_server({:uniq_id => identity}.merge!(options))
  true
end

#shutdown(options = {}) ⇒ Object



65
66
67
68
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 65

def shutdown(options = {})
  requires :identity
  service.shutdown_server({:uniq_id => identity}.merge!(options)).body
end

#startObject



70
71
72
73
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 70

def start
  reqwuires :identity
  service.start_server({:uniq_id => identity}).body
end

#statusObject



75
76
77
78
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 75

def status
  requires :identity
  service.server_status({:uniq_id => identity}).body
end

#update(options) ⇒ Object



80
81
82
83
# File 'lib/fog/compute/storm_on_demand/models/server.rb', line 80

def update(options)
  requires :identity
  service.update_server({:uniq_id => identity}.merge!(options)).body
end