summaryrefslogtreecommitdiffstats
path: root/filters/needlexml2pcscmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'filters/needlexml2pcscmd.py')
-rw-r--r--filters/needlexml2pcscmd.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/filters/needlexml2pcscmd.py b/filters/needlexml2pcscmd.py
index 146adf2..88c5914 100644
--- a/filters/needlexml2pcscmd.py
+++ b/filters/needlexml2pcscmd.py
@@ -6,9 +6,33 @@
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from ..filter import XMLFilter
+from ..utils_xslt import xslt_params
-@XMLFilter.deco('coroxml-needle', 'string-list')
+@XMLFilter.deco('coroxml-needle', 'string-list', defs=dict(
+ pcscmd_force=False,
+ pcscmd_noauth=False,
+ pcscmd_verbose=True,
+ pcscmd_dryrun=False,
+ pcscmd_enable=False,
+ pcscmd_start_wait=60,
+ pcscmd_noguidance=0,
+))
def needlexml2pcscmd(flt_ctxt, in_obj):
"""Outputs set of pcs commands to reinstate the cluster per corosync.conf"""
- raise NotImplementedError("expected to come soon")
+ return (
+ 'bytestring',
+ flt_ctxt.ctxt_proceed_xslt(
+ in_obj,
+ textmode=True,
+ def_first=xslt_params(
+ pcscmd_force=flt_ctxt['pcscmd_force'],
+ pcscmd_noauth=flt_ctxt['pcscmd_noauth'],
+ pcscmd_verbose=flt_ctxt['pcscmd_verbose'],
+ pcscmd_dryrun=flt_ctxt['pcscmd_dryrun'],
+ pcscmd_enable=flt_ctxt['pcscmd_enable'],
+ pcscmd_start_wait=flt_ctxt['pcscmd_start_wait'],
+ pcscmd_noguidance=flt_ctxt['pcscmd_noguidance'],
+ ),
+ ),
+ )