summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rwxr-xr-xpython/vyos/xml_ref/generate_op_cache.py6
-rw-r--r--python/vyos/xml_ref/op_definition.py6
2 files changed, 6 insertions, 6 deletions
diff --git a/python/vyos/xml_ref/generate_op_cache.py b/python/vyos/xml_ref/generate_op_cache.py
index c00e676df..a81871eea 100755
--- a/python/vyos/xml_ref/generate_op_cache.py
+++ b/python/vyos/xml_ref/generate_op_cache.py
@@ -186,7 +186,7 @@ def insert_node(
cur_node_data.command = command_text
cur_node_data.path = path
- value = {('node_data', None): cur_node_data}
+ value = {('__node_data', None): cur_node_data}
key = (name, node_type)
cur_value = d.setdefault(key, value)
@@ -196,10 +196,10 @@ def insert_node(
if (
CHECK_XML_CONSISTENCY
- and cur_value[('node_data', None)] != value[('node_data', None)]
+ and cur_value[('__node_data', None)] != value[('__node_data', None)]
):
err_buf.write(
- f"prev: {cur_value[('node_data', None)]}; new: {value[('node_data', None)]}\n"
+ f"prev: {cur_value[('__node_data', None)]}; new: {value[('__node_data', None)]}\n"
)
if children is not None:
diff --git a/python/vyos/xml_ref/op_definition.py b/python/vyos/xml_ref/op_definition.py
index f61181262..2f47ba1a6 100644
--- a/python/vyos/xml_ref/op_definition.py
+++ b/python/vyos/xml_ref/op_definition.py
@@ -81,7 +81,7 @@ def tuple_paths(d: dict) -> Iterator[list[tuple]]:
if not d:
yield path
for k, v in d.items():
- if isinstance(k, tuple) and key_name(k) != 'node_data':
+ if isinstance(k, tuple) and key_name(k) != '__node_data':
for r in func(v, path + [k]):
yield r
else:
@@ -109,7 +109,7 @@ def get_node_data_at_path(d: dict, tpath):
d = d.get(tpath[0], {})
tpath = tpath[1:]
- return d.get(('node_data', None), {})
+ return d.get(('__node_data', None), {})
class OpXml:
@@ -132,7 +132,7 @@ class OpXml:
@staticmethod
def get_node_data_func(k, v):
- if key_name(k) == 'node_data':
+ if key_name(k) == '__node_data':
return v
return None