5172768cb9
git-svn-id: file:///home/svn/framework3/trunk@11753 4d416f70-5f16-0410-b530-b9f4589650da
23 lines
418 B
Ruby
23 lines
418 B
Ruby
module Lab
|
|
module Controllers
|
|
module VirtualBoxController
|
|
|
|
def self.running_list
|
|
vm_names_and_uuids = `VBoxManage list runningvms`.split("\n")
|
|
4.times { vm_names_and_uuids.shift }
|
|
|
|
vm_names = []
|
|
vm_names_and_uuids.each do |entry|
|
|
vm_names << entry.split('"')[1]
|
|
end
|
|
|
|
return vm_names
|
|
end
|
|
|
|
def self.dir_list(basepath=nil)
|
|
vm_list = Find.find(basepath).select { |f| f =~ /\.xml$/ }
|
|
end
|
|
end
|
|
end
|
|
end
|