Loading src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +17 −2 Original line number Diff line number Diff line Loading @@ -85,8 +85,23 @@ class EndpointComposer: self.objekt = endpoint_obj if settings is None: return json_settings : Dict = settings.value if 'address_ip' in json_settings: self.ipv4_address = json_settings['address_ip'] elif 'ip_address' in json_settings: self.ipv4_address = json_settings['ip_address'] else: MSG = 'IP Address not found. Tried: address_ip and ip_address. endpoint_obj={:s} settings={:s}' LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) if 'address_prefix' in json_settings: self.ipv4_prefix_len = json_settings['address_prefix'] elif 'prefix_length' in json_settings: self.ipv4_prefix_len = json_settings['prefix_length'] else: MSG = 'IP Address Prefix not found. Tried: address_prefix and prefix_length. endpoint_obj={:s} settings={:s}' LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) self.sub_interface_index = json_settings.get('index', 0) def get_config_rules(self, network_instance_name : str, delete : bool = False) -> List[Dict]: Loading Loading
src/service/service/service_handlers/l3nm_gnmi_openconfig/ConfigRuleComposer.py +17 −2 Original line number Diff line number Diff line Loading @@ -85,8 +85,23 @@ class EndpointComposer: self.objekt = endpoint_obj if settings is None: return json_settings : Dict = settings.value if 'address_ip' in json_settings: self.ipv4_address = json_settings['address_ip'] elif 'ip_address' in json_settings: self.ipv4_address = json_settings['ip_address'] else: MSG = 'IP Address not found. Tried: address_ip and ip_address. endpoint_obj={:s} settings={:s}' LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) if 'address_prefix' in json_settings: self.ipv4_prefix_len = json_settings['address_prefix'] elif 'prefix_length' in json_settings: self.ipv4_prefix_len = json_settings['prefix_length'] else: MSG = 'IP Address Prefix not found. Tried: address_prefix and prefix_length. endpoint_obj={:s} settings={:s}' LOGGER.warning(MSG.format(str(endpoint_obj), str(settings))) self.sub_interface_index = json_settings.get('index', 0) def get_config_rules(self, network_instance_name : str, delete : bool = False) -> List[Dict]: Loading