def base_prepare(): LOGGER.info("Base test prepare") LOGGER.info(f"DUT info: {TestProperties.dut}") LOGGER.info("Removing partitions") for disk in TestProperties.dut.disks: disk_utils.remove_partitions(disk) if get_force_param() is not "False" and not hasattr(c, "already_updated"): installer.reinstall_opencas() elif not installer.check_if_installed(): installer.install_opencas() c.already_updated = True # to skip reinstall every test casadm.stop_all_caches()
def remove_partitions(self): for part in self.partitions: if part.is_mounted(): part.unmount() if disk_utils.remove_partitions(self): self.partitions.clear()
def remove_partitions(self): if disk_utils.remove_partitions(self): self.partitions.clear()