def testCloneStorageCrossPool(self): base = "cross-pool" useconn = utils.open_test_remote() clone_disks_file = os.path.join(clonexml_dir, base + "-disks-out.xml") self._clone_helper(base, ["%s/new1.img" % POOL2, "%s/new2.img" % POOL1], clone_disks_file=clone_disks_file, useconn=useconn)
def testCloneStorageCrossPool(self): base = "cross-pool" conn = utils.open_test_remote() clone_disks_file = os.path.join(clonexml_dir, base + "-disks-out.xml") self._clone_helper(base, ["%s/new1.img" % POOL2, "%s/new2.img" % POOL1], clone_disks_file=clone_disks_file, conn=conn)
def testRemoteWithStorage(self): """ Test remote clone with storage needing cloning. Should fail, since libvirt has no storage clone api. """ useconn = utils.open_test_remote() for base in ["general-cfg"] : try: self._clone_helper(base, disks=["%s/1.img" % POOL1, "%s/2.img" % POOL1], useconn=useconn) # We shouldn't succeed, so test fails raise AssertionError("Remote clone with storage passed " "when it shouldn't.") except (ValueError, RuntimeError), e: # Exception expected logging.debug("Received expected exception: %s", str(e))
def testRemoteNoStorage(self): """Test remote clone where VM has no storage that needs cloning""" useconn = utils.open_test_remote() for base in ["nostorage", "noclone-storage"] : self._clone_helper(base, disks=[], useconn=useconn)
def testRemoteNoStorage(self): """Test remote clone where VM has no storage that needs cloning""" useconn = utils.open_test_remote() for base in ["nostorage", "noclone-storage"]: self._clone_helper(base, disks=[], useconn=useconn)