2011-02-16 02:15:24 +00:00
|
|
|
module Lab
|
|
|
|
module Controllers
|
|
|
|
module VirtualBoxController
|
|
|
|
|
|
|
|
def self.running_list
|
2011-02-18 17:03:19 +00:00
|
|
|
vm_names_and_uuids = `VBoxManage list runningvms`
|
|
|
|
return vm_names_and_uuids.scan(/\"(.*)\" {.*}/).flatten
|
|
|
|
end
|
2011-02-16 02:15:24 +00:00
|
|
|
|
2011-02-18 17:03:19 +00:00
|
|
|
def self.config_list
|
|
|
|
vm_names_and_uuids = `VBoxManage list vms`
|
|
|
|
return vm_names_and_uuids.scan(/\"(.*)\" {.*}/).flatten
|
2011-02-16 02:15:24 +00:00
|
|
|
end
|
|
|
|
|
2011-02-18 17:03:19 +00:00
|
|
|
def self.config_list_uuid
|
|
|
|
vm_names_and_uuids = `VBoxManage list vms`
|
|
|
|
return vm_names_and_uuids.scan(/\".*\" {(.*)}/).flatten
|
|
|
|
end
|
|
|
|
|
2011-02-16 02:15:24 +00:00
|
|
|
def self.dir_list(basepath=nil)
|
|
|
|
vm_list = Find.find(basepath).select { |f| f =~ /\.xml$/ }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|