Commit 5f3d506d by tarokkk

outsourcing test and adding lookupByName

parent faaf1293
......@@ -54,10 +54,9 @@ class VMDriver:
def list_domains(self):
return self.connection.listDefinedDomains()
#Create VM
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])
@req_connection
def lookupByName(self, name):
try:
self.connection.lookupByName(name)
except libvirt.libvirtError as e:
logging.error(e.get_error_message())
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