Commit e10bd367 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Service component - L3NM gNMI OpenConfig:

- Ignore default networks 0.0.0.0/*
parent 43ab6388
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -201,6 +201,7 @@ class DeviceComposer:
                endpoint.ipv4_prefix_len = ipv4_prefix_len
                endpoint.sub_interface_index = int(subif_index)
                endpoint_ip_network = netaddr.IPNetwork('{:s}/{:d}'.format(ipv4_network, ipv4_prefix_len))
                if '0.0.0.0/' not in str(endpoint_ip_network.cidr):
                    self.connected.add(str(endpoint_ip_network.cidr))

            match = RE_SR.match(config_rule_custom.resource_key)
+1 −0
Original line number Diff line number Diff line
@@ -138,6 +138,7 @@ class StaticRouteGenerator:
            if endpoint.ipv4_address is None: continue
            ip_network = _compose_ipv4_network(endpoint.ipv4_address, endpoint.ipv4_prefix_len)

            if '0.0.0.0/' in str(ip_network.cidr): continue
            device.connected.add(str(ip_network.cidr))

    def _compute_static_routes(