Skip to content
Snippets Groups Projects

Resolve "(TID) Fix add device get queries"

Merged Pablo Armingol requested to merge feat/1tid-fix-add-device-get-queries into develop
3 files
+ 9
11
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -31,10 +31,6 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
@@ -31,10 +31,6 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
interface = {}
interface = {}
interface_name = xml_interface.find('oci:name', namespaces=NAMESPACES)
if interface_name is None or interface_name.text is None: continue
add_value_from_tag(interface, 'name', interface_name)
#interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES)
#interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES)
#add_value_from_tag(interface, 'type', interface_type)
#add_value_from_tag(interface, 'type', interface_type)
@@ -42,8 +38,11 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
@@ -42,8 +38,11 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]:
interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES)
interface_type = xml_interface.find('oci:config/oci:type', namespaces=NAMESPACES)
elif xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES) is not None:
elif xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES) is not None:
interface_type = xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES)
interface_type = xml_interface.find('oci:state/oci:type', namespaces=NAMESPACES)
else:
else: continue
interface_type = ''
 
interface_name = xml_interface.find('oci:name', namespaces=NAMESPACES)
 
if interface_name is None or interface_name.text is None: continue
 
add_value_from_tag(interface, 'name', interface_name)
# Get the type of interface according to the vendor's type
# Get the type of interface according to the vendor's type
if 'ianaift:' in interface_type.text:
if 'ianaift:' in interface_type.text:
Loading