diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2015-07-02 23:30:33 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2015-07-02 23:44:12 +0200 |
commit | cc90e481c126f97e5c191bdfe028d61089a92e3f (patch) | |
tree | df871f80c9311b7f6f511e17bc8edc1bd1264073 /commands | |
parent | 0f37d6d5576544a90f9dc4afd9a2efc187eceeaa (diff) | |
download | clufter-cc90e481c126f97e5c191bdfe028d61089a92e3f.tar.gz clufter-cc90e481c126f97e5c191bdfe028d61089a92e3f.tar.xz clufter-cc90e481c126f97e5c191bdfe028d61089a92e3f.zip |
commands/pcs2pcscmd-needle: finalize using new filters
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/pcs2pcscmd.py | 51 |
1 files changed, 39 insertions, 12 deletions
diff --git a/commands/pcs2pcscmd.py b/commands/pcs2pcscmd.py index 6533584..a78e1ee 100644 --- a/commands/pcs2pcscmd.py +++ b/commands/pcs2pcscmd.py @@ -74,25 +74,50 @@ def pcs2pcscmd_flatiron(cmd_ctxt, @Command.deco(('simpleconfig2needlexml', - ('needlexml2pcscmd', - ('stringiter-combine2'))), + ('simpleconfig-normalize', + ('needlexml2pcscmd', + ('stringiter-combine2')))), ('cib2pcscmd', - ('stringiter-combine2'))) + ('stringiter-combine2'))) def pcs2pcscmd_needle(cmd_ctxt, coro=PATH_COROCONF, cib=PATH_CIB, output="-", + force=False, + noauth=False, + silent=False, + tmp_cib="{cib2pcscmd.defs[pcscmd_tmpcib]}", + dry_run=False, + enable=False, + start_wait="{needlexml2pcscmd.defs[pcscmd_start_wait]}", + noguidance=False, + text_width='0', _common=XMLFilter.command_common): - """[COMMAND CURRENTLY UNAVAILABLE] + """(Corosync v2,Pacemaker) cluster cfg. -> reinstating pcs commands Options: - coro input Corosync v2 config. file - cib input proper Pacemaker cluster config. file - output pcs commands to reinstate the cluster per the inputs + coro input Corosync v2 config. file + cib input proper Pacemaker cluster config. file + output pcs commands to reinstate the cluster per the inputs + force may the force be with emitted pcs commands + noauth skip authentication step (OK if already set up) + silent do not track the progress along the steps execution (echoes) + tmp_cib file to accumulate the changes (empty ~ direct push) + dry_run omit intrusive commands (TMP_CIB reset if empty) + enable enable cluster infrastructure services (autostart on reboot) + start_wait fixed seconds to give cluster to come up initially + noguidance omit extraneous guiding + text_width for commands rewrapping (0/-1/neg. ~ auto/disable/hi-limit) """ - #"""(Corosync v2,Pacemaker) cluster cfg. -> reinstating pcs commands - - raise NotImplementedError("expected to come soon") + cmd_ctxt['pcscmd_force'] = force + cmd_ctxt['pcscmd_noauth'] = noauth + cmd_ctxt['pcscmd_verbose'] = not(silent) + cmd_ctxt['pcscmd_tmpcib'] = tmp_cib + cmd_ctxt['pcscmd_dryrun'] = dry_run + cmd_ctxt['pcscmd_enable'] = enable + cmd_ctxt['pcscmd_start_wait'] = start_wait + cmd_ctxt['pcscmd_noguidance'] = noguidance + cmd_ctxt['text_width'] = text_width file_proto = protocols.plugins['file'].ensure_proto return ( @@ -100,12 +125,14 @@ def pcs2pcscmd_needle(cmd_ctxt, file_proto(coro), ( ( - file_proto(coro), + ( + file_proto(output), + ), ), ), file_proto(cib), #( - # file_proto(output), # already tracked + # file_proto(output), # already tracked #), ), ) |