Class: VirtualMachine
- Inherits:
-
Object
- Object
- VirtualMachine
- Defined in:
- lib/rhev-manager/virtual-machine.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#description ⇒ Object
Returns the value of attribute description.
-
#host_uuid ⇒ Object
Returns the value of attribute host_uuid.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
-
#secure_port ⇒ Object
Returns the value of attribute secure_port.
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(vm) ⇒ VirtualMachine
constructor
A new instance of VirtualMachine.
Constructor Details
#initialize(vm) ⇒ VirtualMachine
Returns a new instance of VirtualMachine.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rhev-manager/virtual-machine.rb', line 4 def initialize(vm) @id = vm['id'] @name = vm['name'] @description = vm['description'] @address = vm['display']['address'] unless vm['display'].nil? @port = vm['display']['port'] unless vm['display'].nil? @secure_port = vm['display']['secure_port'] unless vm['display'].nil? @state = vm['status']['state'] unless vm['status'].nil? @host_uuid = vm['host']['id'] unless vm['host'].nil? end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def address @address end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def description @description end |
#host_uuid ⇒ Object
Returns the value of attribute host_uuid.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def host_uuid @host_uuid end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def port @port end |
#secure_port ⇒ Object
Returns the value of attribute secure_port.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def secure_port @secure_port end |
#state ⇒ Object
Returns the value of attribute state.
2 3 4 |
# File 'lib/rhev-manager/virtual-machine.rb', line 2 def state @state end |