Skip to content

Commit 219cb15

Browse files
Dev: pre-migration: add summary section to output (jsc#PED-11808)
(cherry picked from commit 1e48317)
1 parent 941a0ab commit 219cb15

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crmsh/migration.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ def check(args: typing.Sequence[str]) -> int:
185185
remote_ret = next(check_remote_yield)
186186
if remote_ret > ret:
187187
ret = remote_ret
188+
if not parsed_args.json:
189+
print('****** summary ******')
190+
if ret == 0:
191+
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.GREEN, '[INFO]')
192+
sys.stdout.write(' Please run "crm cluster health sles16 --fix" on on any one of above nodes, after migrating all the nodes to SLES 16.\n')
193+
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.GREEN, '[PASS]')
194+
sys.stdout.write(' This cluster is good to migrate to SLES 16.\n')
195+
else:
196+
CheckResultInteractiveHandler.write_in_color(sys.stdout, constants.RED, '[FAIL]')
197+
sys.stdout.write(' Please fix all the "FAIL" problems above before migrating to SLES 16.\n')
188198
return ret
189199

190200

0 commit comments

Comments
 (0)