def teardown(): """ Teardown for vPool package, will be executed when all started tests in this package have ended Removal actions of possible things left over after the test-run :return: None """ alba_backend = GeneralAlba.get_by_name(General.get_config().get('backend', 'name')) if alba_backend: GeneralAlba.unclaim_disks_and_remove_alba_backend(alba_backend=alba_backend)
def teardown(): """ Teardown for VirtualMachine package, will be executed when all started tests in this package have ended Removal actions of possible things left over after the test-run :return: None """ vpool_name = General.get_config().get('vpool', 'name') vpool = GeneralVPool.get_vpool_by_name(vpool_name) assert vpool is not None, "No vpool found where one was expected" GeneralVMachine.logger.info("Cleaning vpool") GeneralVPool.remove_vpool(vpool) alba_backend = GeneralAlba.get_by_name(General.get_config().get('backend', 'name')) if alba_backend is not None: GeneralAlba.unclaim_disks_and_remove_alba_backend(alba_backend=alba_backend)
def teardown(): """ Teardown for VirtualDisk package, will be executed when all started tests in this package have ended Removal actions of possible things left over after the test-run :return: None """ vpool_name = General.get_config().get("vpool", "name") vpool = GeneralVPool.get_vpool_by_name(vpool_name) for vd in VDiskList.get_vdisks(): GeneralVDisk.delete_volume(vd, vpool, loop_device='loop0') if vpool is not None: GeneralVPool.remove_vpool(vpool) alba_backend = GeneralAlba.get_by_name(General.get_config().get('backend', 'name')) if alba_backend is not None: GeneralAlba.unclaim_disks_and_remove_alba_backend(alba_backend=alba_backend)