Skip to content
Snippets Groups Projects
Commit ccbf8139 authored by Pablo Armingol's avatar Pablo Armingol
Browse files

Merge branch 'develop' of https://labs.etsi.org/rep/tfs/controller into...

Merge branch 'develop' of https://labs.etsi.org/rep/tfs/controller into 77-tid-visual-inventory-management-2
parents 7bf22705 faa30fbf
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!161Resolve "(TID) Visual inventory management"
...@@ -109,7 +109,10 @@ class NetconfSessionHandler: ...@@ -109,7 +109,10 @@ class NetconfSessionHandler:
@RETRY_DECORATOR @RETRY_DECORATOR
def get(self, filter=None, with_defaults=None): # pylint: disable=redefined-builtin def get(self, filter=None, with_defaults=None): # pylint: disable=redefined-builtin
with self.__lock: with self.__lock:
return self.__manager.get(filter=filter, with_defaults=with_defaults) if self.__vendor == 'JUNIPER'and not 'component' in str(filter):
return self.__manager.get_config(source="running", filter=filter, with_defaults=with_defaults)
else:
return self.__manager.get(filter=filter, with_defaults=with_defaults)
@RETRY_DECORATOR @RETRY_DECORATOR
def edit_config( def edit_config(
......
...@@ -89,9 +89,7 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: ...@@ -89,9 +89,7 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
add_value_from_tag(inventory['attributes'], 'empty', component_empty) add_value_from_tag(inventory['attributes'], 'empty', component_empty)
component_parent = xml_component.find('ocp:state/ocp:parent', namespaces=NAMESPACES) component_parent = xml_component.find('ocp:state/ocp:parent', namespaces=NAMESPACES)
if component_parent is None or component_parent.text is None: if not component_parent is None:
add_value_from_tag(inventory, 'parent-component-references', component_type)
else:
add_value_from_tag(inventory, 'parent-component-references', component_parent) add_value_from_tag(inventory, 'parent-component-references', component_parent)
component_HW = xml_component.find('ocp:state/ocp:hardware-version', namespaces=NAMESPACES) component_HW = xml_component.find('ocp:state/ocp:hardware-version', namespaces=NAMESPACES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment