summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2015-06-22 23:06:22 +0200
committerJan Pokorný <jpokorny@redhat.com>2015-07-02 23:43:01 +0200
commitabcde1c7a71d3b8c59a14a7406c465c13e652fa5 (patch)
tree7917fda4ebd712c37a5997bc0441f9f3276fc458 /commands
parent52d54f461b0a7f6cd7a06b4288d64e807368d4dd (diff)
downloadclufter-abcde1c7a71d3b8c59a14a7406c465c13e652fa5.tar.gz
clufter-abcde1c7a71d3b8c59a14a7406c465c13e652fa5.tar.xz
clufter-abcde1c7a71d3b8c59a14a7406c465c13e652fa5.zip
commands: ccs2pcscmd(-flatiron:): deploy cmd-wrap filter
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to 'commands')
-rw-r--r--commands/ccs2pcscmd.py31
1 files changed, 23 insertions, 8 deletions
diff --git a/commands/ccs2pcscmd.py b/commands/ccs2pcscmd.py
index 7efe683..cbdce49 100644
--- a/commands/ccs2pcscmd.py
+++ b/commands/ccs2pcscmd.py
@@ -18,10 +18,12 @@ from .ccs2pcs import ccsflat2cibfinal_chain
('ccs2ccs-pcmk',
('ccs-version-bump',
('ccspcmk2pcscmd',
- ('stringiter-combine2'))))),
+ ('stringiter-combine2',
+ ('cmd-wrap')))))),
(ccsflat2cibfinal_chain,
('cib2pcscmd',
- ('stringiter-combine2')))))
+ ('stringiter-combine2' # , ('cmd-wrap' ...
+ )))))
def ccs2pcscmd_flatiron(cmd_ctxt,
input=PATH_CLUSTERCONF,
output="-",
@@ -33,6 +35,7 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
enable=False,
start_wait="{ccspcmk2pcscmd.defs[pcscmd_start_wait]}",
noguidance=False,
+ text_width='0',
_common=XMLFilter.command_common):
"""(CMAN,rgmanager) cluster cfg. -> equivalent in pcs commands
@@ -47,6 +50,7 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
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 used for rewrapping the commands (0 ~ auto)
"""
cmd_ctxt['pcscmd_force'] = force
@@ -57,6 +61,7 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
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 (
file_proto(input),
@@ -65,7 +70,9 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
(
(
(
- file_proto(output),
+ (
+ file_proto(output),
+ ),
),
),
),
@@ -76,7 +83,9 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
# (
# (
# (
- # file_proto(output), # already tracked
+ # (
+ # file_proto(output), # already tracked
+ # ),
# ),
# ),
# ),
@@ -91,10 +100,12 @@ def ccs2pcscmd_flatiron(cmd_ctxt,
('ccs-propagate-cman',
('ccs2needlexml',
('needlexml2pcscmd',
- ('stringiter-combine2')))),
+ ('stringiter-combine2',
+ ('cmd-wrap'))))),
(ccsflat2cibfinal_chain,
('cib2pcscmd',
- ('stringiter-combine2')))))
+ ('stringiter-combine2' # , ('cmd-wrap' ...
+ )))))
def ccs2pcscmd_needle(cmd_ctxt,
input=PATH_CLUSTERCONF,
output="-",
@@ -113,7 +124,9 @@ def ccs2pcscmd_needle(cmd_ctxt,
(
(
(
- file_proto(output),
+ (
+ file_proto(output),
+ ),
),
),
),
@@ -123,7 +136,9 @@ def ccs2pcscmd_needle(cmd_ctxt,
# (
# (
# (
- # file_proto(output), # already tracked
+ # (
+ # file_proto(output), # already tracked
+ # ),
# ),
# ),
# ),