diff options
author | Jan Pokorný <jpokorny@redhat.com> | 2014-06-16 17:55:36 +0200 |
---|---|---|
committer | Jan Pokorný <jpokorny@redhat.com> | 2014-06-16 18:57:17 +0200 |
commit | f1a9f5e75c420a8710c46203163119b49bb48f4a (patch) | |
tree | 1b042e480b8231f4233107ae4b4b33d7639cb7d5 /commands | |
parent | 2489b45814189739ad832aed32b13db693848207 (diff) | |
download | clufter-f1a9f5e75c420a8710c46203163119b49bb48f4a.tar.gz clufter-f1a9f5e75c420a8710c46203163119b49bb48f4a.tar.xz clufter-f1a9f5e75c420a8710c46203163119b49bb48f4a.zip |
command: add behavior of deferring to _common as already doc'd
(in doc/HACKING in the previous commit)
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ccs2pcs.py | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/commands/ccs2pcs.py b/commands/ccs2pcs.py index d7df015..164e534 100644 --- a/commands/ccs2pcs.py +++ b/commands/ccs2pcs.py @@ -6,6 +6,7 @@ __author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>" from ..command import Command, CommandAlias +from ..filter import XMLFilter @Command.deco(('ccs2flatccs', @@ -15,10 +16,9 @@ from ..command import Command, CommandAlias ('pcs2simplepcs'))))) def ccs2pcs_flatiron(cmd_ctxt, input="/etc/cluster/cluster.conf", - ccs_pcmk="./cluster.conf", - cib="./cib.xml", - nocheck=False, - raw=False): + ccs_pcmk="cluster.conf", + cib="cib.xml", + _common=XMLFilter.command_common): """CMAN -> Pacemaker-based cluster config. (corosync v1) More specifically, the output is suitable for Pacemaker integrated @@ -30,11 +30,7 @@ def ccs2pcs_flatiron(cmd_ctxt, input input CMAN-based cluster configuration file ccs_pcmk output Pacemaker pass-through CMAN configuration cib output Pacemaker-based cluster configuration file - nocheck do not validate any step (even if self-checks present) - raw do not ensure pretty-printed output where applicable """ - cmd_ctxt.filter()['raw'] = raw - cmd_ctxt.filter()['validate'] = not nocheck return ( ('file', input), ( @@ -56,10 +52,9 @@ def ccs2pcs_flatiron(cmd_ctxt, ('xml2simpleconfig')))) def ccs2pcs_needle(cmd_ctxt, input="/etc/cluster/cluster.conf", - cib="./cib.xml", - coro="./corosync.conf", - nocheck=False, - raw=False): + cib="cib.xml", + coro="corosync.conf", + _common=XMLFilter.command_common): """CMAN -> Pacemaker-based cluster config. (corosync v2) More specifically, the output is suitable for Pacemaker integrated @@ -70,11 +65,7 @@ def ccs2pcs_needle(cmd_ctxt, input input CMAN-based cluster configuration file cib output Pacemaker-based cluster configuration file coro output Corosync v2 configuration file - nocheck do not validate any step (even if self-checks present) - raw do not ensure pretty-printed output where applicable """ - cmd_ctxt.filter()['raw'] = raw - cmd_ctxt.filter()['validate'] = not nocheck return ( ('file', input), ( |