Example #1
0
 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)
Example #2
0
 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)
Example #3
0
    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))
Example #4
0
    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))
Example #5
0
 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)
Example #6
0
 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)