fix: place index first in the request-list because of libyang bug

libyang does not find key in data if not placed first in the data

Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
Change-Id: I63b9aa619e15d770e2dcb59010223318d2518eb7
This commit is contained in:
EstherLerouzic
2025-04-29 11:21:02 +02:00
parent d43fee5945
commit ea4ab1d61b

View File

@@ -184,14 +184,15 @@ class Request_element(Element):
if self.nodes_list:
req_dictionnary['explicit-route-objects'] = {}
temp = {'route-object-include-exclude': [
{'explicit-route-usage': 'route-include-ero',
'index': self.nodes_list.index(node),
'num-unnum-hop': {
'node-id': f'{node}',
'link-tp-id': 'link-tp-id is not used',
'hop-type': f'{self.loose}',
}
}
{
'index': self.nodes_list.index(node),
'explicit-route-usage': 'route-include-ero',
'num-unnum-hop': {
'node-id': f'{node}',
'link-tp-id': 'link-tp-id is not used',
'hop-type': f'{self.loose}',
}
}
for node in self.nodes_list]
}
req_dictionnary['explicit-route-objects'] = temp