def setUp(self): self.session = "SessionForTest" self.bnvmapi = BNVMAPI.instance() self.conn = self.__get_libvirt_connection() self.pool_name = 'pool_test' self.vol_name = 'vol_test' self.des_vol_name = 'vol_test_ref' self.vol_size = 2 self.target_path = '/home/test/tmp' self.pool = self.conn.storagePoolLookupByName(self.pool_name) self.dom = self.conn.lookupByName('test') self.target_disk = 'hdd'
def setUp(self): self.session = "SessionForTest" self.bnvmapi = BNVMAPI.instance() self.conn = self.__get_libvirt_connection() self.dom = self.conn.lookupByName('test') self.name = 'eth_test' self.bridge = 'ovs0' try: self.bnvmapi.VIF_create(self.session, self.name, self.bridge) except Exception: pass vm_uuidstr = self.dom.UUIDString() try: self.bnvmapi.VM_attach_vif(self.session, vm_uuidstr, self.name) except Exception: pass
def setUp(self): self.session = "SessionForTest" self.bnvmapi = BNVMAPI.instance() self.conn = self.__get_libvirt_connection() self.pool_name = 'pool_test' self.target_path = '/home/test/tmp'