Example #1
0
    def _clean_leftovers(self):
        conn = self.conn.get()
        FeatureTests.disable_libvirt_error_logging()
        try:
            dom = conn.lookupByName(FEATURETEST_VM_NAME)
            dom.undefine()
        except Exception:
            # Any exception can be ignored here
            pass

        try:
            pool = conn.storagePoolLookupByName(FEATURETEST_POOL_NAME)
            pool.undefine()
        except Exception:
            # Any exception can be ignored here
            pass

        FeatureTests.enable_libvirt_error_logging()
Example #2
0
    def _clean_leftovers(self):
        conn = self.conn.get()
        FeatureTests.disable_libvirt_error_logging()
        try:
            dom = conn.lookupByName(FEATURETEST_VM_NAME)
            dom.undefine()
        except Exception:
            # Any exception can be ignored here
            pass

        try:
            pool = conn.storagePoolLookupByName(FEATURETEST_POOL_NAME)
            pool.undefine()
        except Exception:
            # Any exception can be ignored here
            pass

        FeatureTests.enable_libvirt_error_logging()