def resource_cleanup(cls): """Class level resource cleanup for test cases. Resource cleanup must be able to handle the case of partially setup resources, in case a failure during `resource_setup` should happen. """ if cls.validation_resources: if hasattr(cls, "os"): vresources.clear_validation_resources(cls.os, cls.validation_resources) cls.validation_resources = {} else: LOG.warn("Client manager not found, validation resources not" " deleted")
def resource_cleanup(cls): """Class level resource cleanup for test cases. Resource cleanup must be able to handle the case of partially setup resources, in case a failure during `resource_setup` should happen. """ if cls.validation_resources: if hasattr(cls, "os"): vresources.clear_validation_resources(cls.os, cls.validation_resources) cls.validation_resources = {} else: LOG.warn("Client manager not found, validation resources not" " deleted")
def resource_cleanup(cls): """Class level resource cleanup for test cases. Resource cleanup must be able to handle the case of partially setup resources, in case a failure during `resource_setup` should happen. """ if cls.validation_resources: if hasattr(cls, "os_primary"): vr = cls.validation_resources vresources.clear_validation_resources( cls.os_primary, use_neutron=CONF.service_available.neutron, **vr) cls.validation_resources = {} else: LOG.warning("Client manager not found, validation resources " "not deleted")