From 68c0521a680dac89d046a631064f315a2c9e29b0 Mon Sep 17 00:00:00 2001 From: Jan Pokorný Date: Wed, 2 Dec 2015 20:59:42 +0100 Subject: filters/ccs2needlexml[logging_daemon]: convert also log. subsys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on tri-state whitelist denoting positive propagation: - 1:1 - 1:1 but emit a warning (the meaning was changing in time) - rename the subsys Opened questions: - should CMAN also be renamed to PCMK? Also fix affected (but not directly related) unit test. Signed-off-by: Jan Pokorný --- filters/cluster/logging/logging_daemon/__init__.py | 64 ++++++++++++++++++++-- tests/functional/try_edit.ok | 2 +- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/filters/cluster/logging/logging_daemon/__init__.py b/filters/cluster/logging/logging_daemon/__init__.py index ea13785..5e85430 100644 --- a/filters/cluster/logging/logging_daemon/__init__.py +++ b/filters/cluster/logging/logging_daemon/__init__.py @@ -3,7 +3,7 @@ # Part of clufter project # Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt) -from ....utils_xslt import xslt_is_member +from ....utils_xslt import xslt_is_member, xslt_string_mapping from logging import getLogger log = getLogger(__name__) @@ -20,13 +20,69 @@ except IOError: else: ccs2needlexml_attrs = myglobals['ccs2needlexml_attrs'] + ('subsys', ) +# flatiron -> needle logging subsys mapping +# domain: True (stay as is), False (ditto + warning), string (rename to this) +ccs2needlexml_subsys = { + 'APIDEF': True, + 'CFG': True, + 'CONFDB': 'CMAP', + 'CPG': True, + 'PLOAD': True, + 'SERV': True, + 'SYNC': False, + 'SYNCV2': 'SYNC', + 'VOTEQ': True, + 'YKD': True, +} + ccs2needlexml = '''\ - + - +) + ''' + ]"> + + + + + + + + + + + + + + +''' + ( + xslt_string_mapping(ccs2needlexml_subsys) +) + ''' + + + + + ''' diff --git a/tests/functional/try_edit.ok b/tests/functional/try_edit.ok index 6b39b00..49c2a8a 100644 --- a/tests/functional/try_edit.ok +++ b/tests/functional/try_edit.ok @@ -5,7 +5,7 @@ - + -- cgit