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
-
#template_id ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not by fog.
- #vm_ip_address ⇒ Object
- #vm_mac_address ⇒ Object
-
#vminterfaces ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not by fog.
-
#vminterfaces_attributes=(attributes) ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not from by fog.
Instance Method Details
#console_output ⇒ Object
93 94 95 96 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 93 def console_output requires :id service.get_vnc_console(id, "vnc", onevm_object) end |
#destroy ⇒ Object
78 79 80 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 78 def destroy service.vm_destroy(id) end |
#private_ip_address ⇒ Object
46 47 48 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 46 def private_ip_address ip end |
#public_ip_address ⇒ Object
50 51 52 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 50 def public_ip_address ip end |
#ready? ⇒ Boolean
82 83 84 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 82 def ready? (status == 3) end |
#resume ⇒ Object
74 75 76 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 74 def resume service.vm_resume(id) end |
#save ⇒ Object
24 25 26 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 24 def save merge_attributes(service.vm_allocate(attributes)) end |
#start ⇒ Object
58 59 60 61 62 63 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 58 def start if status == 4 service.vm_resume(id) end true end |
#stop ⇒ Object
65 66 67 68 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 65 def stop Fog::Logger.warning("stop VM: ID:#{id}") service.vm_stop(id) end |
#suspend ⇒ Object
70 71 72 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 70 def suspend service.vm_suspend(id) end |
#template_id ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not by fog
89 90 91 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 89 def template_id "" end |
#vm_ip_address ⇒ Object
42 43 44 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 42 def vm_ip_address ip end |
#vm_mac_address ⇒ Object
54 55 56 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 54 def vm_mac_address mac end |
#vminterfaces ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not by fog
31 32 33 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 31 def vminterfaces [] end |
#vminterfaces_attributes=(attributes) ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not from by fog
38 39 40 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 38 def vminterfaces_attributes=(attributes) true end |