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

1) Code cleanup

2)Moving interface management to another branch
parent cc8c3f8e
No related branches found
No related tags found
2 merge requests!235Release TeraFlowSDN 3.0,!150Resolve "(TID) Network device inventory management"
...@@ -34,7 +34,6 @@ def compose_config_rules_data( ...@@ -34,7 +34,6 @@ def compose_config_rules_data(
) -> List[Dict]: ) -> List[Dict]:
dict_config_rules : List[Dict] = list() dict_config_rules : List[Dict] = list()
for position,config_rule in enumerate(config_rules): for position,config_rule in enumerate(config_rules):
str_kind = config_rule.WhichOneof('config_rule') str_kind = config_rule.WhichOneof('config_rule')
kind = ConfigRuleKindEnum._member_map_.get(str_kind.upper()) # pylint: disable=no-member kind = ConfigRuleKindEnum._member_map_.get(str_kind.upper()) # pylint: disable=no-member
dict_config_rule = { dict_config_rule = {
......
...@@ -98,15 +98,6 @@ def parse(xml_data : ET.Element) -> List[Tuple[str, Dict[str, Any]]]: ...@@ -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) #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 if len(subinterface) == 0: continue
resource_key = '/interface[{:s}]/subinterface[{:s}]'.format(interface['name'], str(subinterface['index'])) resource_key = '/interface[{:s}]/subinterface[{:s}]'.format(interface['name'], str(subinterface['index']))
response.append((resource_key, subinterface)) response.append((resource_key, subinterface))
......
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