示例#1
0
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()
示例#2
0
 def remove_partitions(self):
     for part in self.partitions:
         if part.is_mounted():
             part.unmount()
     if disk_utils.remove_partitions(self):
         self.partitions.clear()
示例#3
0
 def remove_partitions(self):
     if disk_utils.remove_partitions(self):
         self.partitions.clear()