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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute password to.



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(options)
  requires :identity
  service.clone_server({:uniq_id => identity}.merge!(options))
  true
end

#destroyObject



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(options={})
  requires :identity
  params = {:uniq_id => identity}.merge!(options)
  res = service.server_history(params).body
  res['items']
end

#ready?Boolean

Returns:

  • (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(options={})
  requires :identity
  service.reboot_server({:uniq_id => identity}.merge!(options))
  true
end

#resize(options) ⇒ Object



56
57
58
59
60
# File 'lib/fog/storm_on_demand/models/compute/server.rb', line 56

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

#shutdown(options = {}) ⇒ Object



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

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

#startObject



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

#statusObject



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(options)
  requires :identity
  service.update_server({:uniq_id => identity}.merge!(options)).body
end