def restore_with_frontend(url, engine_name, backup): client = ControllerClient(url) client.volume_frontend_shutdown() cmd.backup_restore(url, backup) wait_for_restore_completion(url, backup) client.volume_frontend_start(FRONTEND_TGT_BLOCKDEV) return
def rm_backups(url, engine_name, backups): for b in backups: cmd.backup_rm(url, b) with pytest.raises(subprocess.CalledProcessError): restore_with_frontend(url, engine_name, b) with pytest.raises(subprocess.CalledProcessError): cmd.backup_inspect(url, b) # Engine frontend is down, Start it up client = ControllerClient(url) client.volume_frontend_start(FRONTEND_TGT_BLOCKDEV)
def snapshot_revert_with_frontend(url, engine_name, name): client = ControllerClient(url) client.volume_frontend_shutdown() cmd.snapshot_revert(url, name) client.volume_frontend_start(FRONTEND_TGT_BLOCKDEV)