reident tests

This commit is contained in:
2021-04-13 11:07:10 +02:00
parent cda68e88a2
commit 65d40f494f
421 changed files with 6203 additions and 7129 deletions

View File

@ -38,7 +38,7 @@
<!-- =============== -->
<!ELEMENT rougail (services|variables|constraints)*>
<!ATTLIST rougail version (0.9) #REQUIRED>
<!ATTLIST rougail version (0.10) #REQUIRED>
<!-- ============== -->
<!-- files element -->
@ -83,6 +83,7 @@
<!ATTLIST family mode CDATA #IMPLIED>
<!ATTLIST family hidden (True|False) "False">
<!ATTLIST family dynamic CDATA #IMPLIED>
<!ATTLIST family leadership (True|False) "False">
<!ATTLIST family provider CDATA #IMPLIED>
<!ELEMENT variable (value*)>
@ -107,7 +108,7 @@
<!ELEMENT value (#PCDATA)>
<!ELEMENT constraints ((fill*|check*|condition*|group*)*)>
<!ELEMENT constraints ((fill*|check*|condition*)*)>
<!ELEMENT fill ((target|param)+)>
<!ATTLIST fill name CDATA #REQUIRED>
@ -132,9 +133,4 @@
<!ATTLIST target type (variable|family|servicelist|filelist|iplist) "variable">
<!ATTLIST target optional (True|False) "False">
<!ELEMENT group (follower+)>
<!ATTLIST group leader CDATA #REQUIRED>
<!ATTLIST group name CDATA #IMPLIED>
<!ATTLIST group description CDATA #IMPLIED>
<!ELEMENT follower (#PCDATA)>

View File

@ -84,6 +84,7 @@ class RougailUpgrade:
root = getattr(self, function_version)(root, upgrade_help, namespace)
if function_version == search_function_name:
function_found = True
root.attrib['version'] = version
with open(xmldst, 'wb') as xmlfh:
xmlfh.write(tostring(root, pretty_print=True, encoding="UTF-8", xml_declaration=True))
# if
@ -101,7 +102,6 @@ class RougailUpgrade:
) -> 'Element':
# rename root
root.tag = 'rougail'
root.attrib['version'] = '0.9'
variables_auto_valid_enum = {}
variables_help = {}
families_help = {}