Commit 066e15d5 by tarokkk

adding more options to test scripts

parent e43be4ef
......@@ -4,21 +4,29 @@ import vm
import vmdriver
import logging
from nose.tools import raises
graphics = {'type': 'vnc', 'listen':
'0.0.0.0', 'port': '6300', 'passwd': 'asd'}
a = vm.VMNetwork(name="vm-88", mac="02:00:00:00:00:00")
b = vm.VMDisk(name="asd", source='/asdasd/adasds/asd')
testvm = vm.VMInstance(name="Thisthename", vcpu="1",
memory_max="2048",
disk_list=[a],
network_list=[b])
network_list=[b],
graphics=graphics)
# Enable logging
logging.basicConfig(filename='example.log', level=logging.DEBUG)
print testvm.dump_xml()
vm_driver = vmdriver.VMDriver()
vm_driver.connect()
# vm_driver.vm_define(None)
vm_driver.lookupByName("asdasd")
print vm_driver.list_domains()
vm_driver.disconnect()
vm_driver.vm_define(testvm)
print '%(name)s defined.' % {'name': testvm.name}
for i in vm_driver.list_domains():
print i
#vm_driver.vm_start(i)
vm_driver.vm_undefine(i)
print '%(name)s undefined.' % {'name': i}
vm_driver.disconnect()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment