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)