From e5d2f40702f17a4dd5d4fe6134134e4a28820f75 Mon Sep 17 00:00:00 2001 From: Armingol <pablo.armingolrobles@telefonica.com> Date: Fri, 29 Sep 2023 14:40:57 +0200 Subject: [PATCH] 1) Code cleanup 2)Moving interface management to another branch --- src/context/service/database/ConfigRule.py | 1 - .../service/drivers/openconfig/templates/Interfaces.py | 9 --------- 2 files changed, 10 deletions(-) diff --git a/src/context/service/database/ConfigRule.py b/src/context/service/database/ConfigRule.py index 1c5a2c7d5..c5b259a2d 100644 --- a/src/context/service/database/ConfigRule.py +++ b/src/context/service/database/ConfigRule.py @@ -34,7 +34,6 @@ def compose_config_rules_data( ) -> List[Dict]: dict_config_rules : List[Dict] = list() for position,config_rule in enumerate(config_rules): - str_kind = config_rule.WhichOneof('config_rule') kind = ConfigRuleKindEnum._member_map_.get(str_kind.upper()) # pylint: disable=no-member dict_config_rule = { diff --git a/src/device/service/drivers/openconfig/templates/Interfaces.py b/src/device/service/drivers/openconfig/templates/Interfaces.py index 8d1dcf16e..27048385e 100644 --- a/src/device/service/drivers/openconfig/templates/Interfaces.py +++ b/src/device/service/drivers/openconfig/templates/Interfaces.py @@ -98,15 +98,6 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: #add_value_from_collection(subinterface, 'ipv4_addresses', ipv4_addresses) - for xml_ipv6_address in xml_subinterface.xpath(XPATH_IPV6ADDRESSES, namespaces=NAMESPACES): - #LOGGER.info('xml_ipv6_address = {:s}'.format(str(ET.tostring(xml_ipv6_address)))) - - address = xml_ipv6_address.find('ociip:state/ociip:ip', namespaces=NAMESPACES) - add_value_from_tag(subinterface, 'address_ipv6', address) - - prefix = xml_ipv6_address.find('ociip:state/ociip:prefix-length', namespaces=NAMESPACES) - add_value_from_tag(subinterface, 'address_prefix_v6', prefix, cast=int) - if len(subinterface) == 0: continue resource_key = '/interface[{:s}]/subinterface[{:s}]'.format(interface['name'], str(subinterface['index'])) response.append((resource_key, subinterface)) -- GitLab