def cleanup(self): logging.info("In cleanup function..") status = libzpool.pool_exists(TESTPOOL) if status == SUCCESS: libzpool.destroy(TESTPOOL) logging.info("Cleanup done successfully") return SUCCESS
def cleanup(self): logging.info("In cleanup function.. ") status = libzpool.pool_exists(TESTPOOL) if status == SUCCESS: libzpool.destroy(TESTPOOL) status = libzpool.pool_exists(TESTPOOL1) if status == SUCCESS: libzpool.destroy(TESTPOOL1) for file in [CPATH1, CPATH2]: if os.path.isfile(file): utils.system("rm " + file) logging.info("Cleanup done successfully...") return SUCCESS
def cleanup(self): logging.info("In cleanup function.. ") fs = TESTPOOL + "/" + TESTFS status = libzfs.is_mounted(fs) if status == SUCCESS : libzfs.unmount(fs) libzfs.destroy(fs) status = os.path.exists(TESTDIR) if status == True: utils.system("rm -r " + TESTDIR) status = libzpool.pool_exists(TESTPOOL) if status == SUCCESS: libzpool.destroy(TESTPOOL) logging.info("Cleanup done successfully...") return SUCCESS