force 'configuration' namespace if update

This commit is contained in:
Emmanuel Garette 2022-03-05 11:17:33 +01:00
parent 9de06705e8
commit b610d66fcd
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,8 @@ class ConvertDynOptionDescription(DynOptionDescription):
Suffix could also contain invalid character, so we should "normalize" it
"""
def convert_suffix_to_path(self, suffix):
if suffix is None:
return suffix
if not isinstance(suffix, str):
suffix = str(suffix)
return normalize_family(suffix)

View File

@ -116,7 +116,7 @@ class RougailUpgrade:
if variables is None:
return root
paths = self._get_path_variables(variables,
namespace == self.rougailconfig['variable_namespace'],
namespace == 'configuration',
namespace,
)
constraints = root.find('constraints')
@ -334,7 +334,7 @@ class RougailUpgrade:
subsubsubelement.attrib['mandatory'] = 'True'
if subsubsubelement.attrib['name'] in upgrade_help.get('variables', {}).get('type', {}):
subsubsubelement.attrib['type'] = upgrade_help.get('variables', {}).get('type', {})[subsubsubelement.attrib['name']]
if namespace == self.rougailconfig['variable_namespace']:
if namespace == 'configuration':
path = subsubsubelement.attrib['name']
npath = normalize_family(subsubsubelement.attrib['name'])
else: