Commit 5f3d506d by tarokkk

outsourcing test and adding lookupByName

parent faaf1293
...@@ -54,10 +54,9 @@ class VMDriver: ...@@ -54,10 +54,9 @@ class VMDriver:
def list_domains(self): def list_domains(self):
return self.connection.listDefinedDomains() return self.connection.listDefinedDomains()
#Create VM @req_connection
a = vm.VMNetwork(name="vm-88", mac="02:00:00:00:00:00") def lookupByName(self, name):
b = vm.VMDisk(name="asd", source='/asdasd/adasds/asd') try:
testvm = vm.VMInstance(name="Thisthename", vcpu="1", self.connection.lookupByName(name)
memory_max="2048", except libvirt.libvirtError as e:
disk_list=[a], logging.error(e.get_error_message())
network_list=[b])
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