Class: Roca::VirtualMachinePool

Inherits:
Object
  • Object
show all
Extended by:
ConnectorHelper::ClassMethods
Includes:
ConnectorHelper
Defined in:
lib/roca/virtual_machine_pool.rb

Class Method Summary collapse

Methods included from ConnectorHelper::ClassMethods

connector, connector=

Methods included from ConnectorHelper

#connector, #connector=

Class Method Details

.allObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/roca/virtual_machine_pool.rb', line 6

def self.all
  success_flag, xml_virtual_machines, error_code = connector.execute("one.vmpool.info", -2, -1, -1, -1)
  result = []
  if success_flag then
    doc = Nokogiri::Slop(xml_virtual_machines)
    doc.VM_POOL.children.each do |xml_virtual_machine|
       result << VirtualMachine.build_from_xml(xml_virtual_machine.to_s)
    end
  end
  result
end