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
- #save ⇒ Object
- #start ⇒ Object
- #stop ⇒ 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
85 86 87 88 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 85 def console_output requires :id service.get_vnc_console(id, "vnc", onevm_object) end |
#destroy ⇒ Object
70 71 72 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 70 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
74 75 76 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 74 def ready? (status == 3) 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 |
#template_id ⇒ Object
only for integration in foreman needed by formbuilder should be handled by foreman and not by fog
81 82 83 |
# File 'lib/fog/opennebula/models/compute/server.rb', line 81 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 |