Class: Fog::Compute::OpenNebula::Server
- Inherits:
-
Server
- Object
- Server
- Fog::Compute::OpenNebula::Server
- Defined in:
- lib/fog/opennebula/models/compute/server.rb
Instance Method Summary collapse
- #console_output ⇒ Object
- #destroy ⇒ Object
- #private_ip_address ⇒ Object
- #public_ip_address ⇒ Object
- #ready? ⇒ Boolean
- #resume ⇒ Object
- #save ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
- #suspend ⇒ Object
- #vm_ip_address ⇒ Object
- #vm_mac_address ⇒ Object
Instance Method Details
#console_output ⇒ Object
74 75 76 77 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 74 def console_output requires :id service.get_vnc_console(id, 'vnc', onevm_object) end |
#destroy ⇒ Object
66 67 68 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 66 def destroy service.vm_destroy(id) end |
#private_ip_address ⇒ Object
36 37 38 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 36 def private_ip_address ip end |
#public_ip_address ⇒ Object
40 41 42 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 40 def public_ip_address ip end |
#ready? ⇒ Boolean
70 71 72 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 70 def ready? (status == 3) end |
#resume ⇒ Object
62 63 64 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 62 def resume service.vm_resume(id) end |
#save ⇒ Object
28 29 30 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 28 def save merge_attributes(service.vm_allocate(attributes)) end |
#start ⇒ Object
48 49 50 51 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 48 def start service.vm_resume(id) if status == 4 true end |
#stop ⇒ Object
53 54 55 56 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 53 def stop Fog::Logger.warning("stop VM: ID:#{id}") service.vm_stop(id) end |
#suspend ⇒ Object
58 59 60 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 58 def suspend service.vm_suspend(id) end |
#vm_ip_address ⇒ Object
32 33 34 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 32 def vm_ip_address ip end |
#vm_mac_address ⇒ Object
44 45 46 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 44 def vm_mac_address mac end |