config/sysinv/cgts-client/cgts-client/cgtsclient/v1/restore_shell.py
Dan Voiculeasa 99616a7f72 Introduce CLI commands for system restore control
Introduce 3 new sysinv commands: restore-show, restore-start,
restore-complete.

When doing a restore, the system will be put automatically into a
restore state by the restore playbook. After all the nodes are up
and unlocked the user must do a `system restore-complete` to get
out of the system restore state.

Note: In the case of multi-nodes setups helm overrides may have been
detected so apps will be auto-applied after exiting the restore
state. The auto apply is started by a periodic audit thread.

Depends-On: I44fc4aaa528e372a84115714f271b4f5e063f86e
Partial-Bug: 1887648
Change-Id: I7b7fab99d457056032dbbd612363cd5036736cda
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
2020-10-09 16:54:04 +03:00

27 lines
421 B
Python
Executable File

#
# Copyright (c) 2020 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# -*- encoding: utf-8 -*-
#
def do_restore_start(cc, args):
"""Start software restore."""
print(cc.restore.start())
def do_restore_show(cc, args):
"""Show software restore."""
print(cc.restore.get())
def do_restore_complete(cc, args):
"""Complete software restore."""
print(cc.restore.complete())