diff --git a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 index da6358a00ca6..fbf513e1ef65 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 @@ -8,11 +8,8 @@ ! ! TSA configuration ! -{% set lo0_ipv4 = get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip %} {% set lo4096_ipv4 = get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback4096") | ip %} -{% if lo0_ipv4 is not none %} -ip prefix-list PL_LoopbackV4 permit {{ lo0_ipv4 }}/32 -{% endif %} +ip prefix-list PL_LoopbackV4 permit {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/32 ! {% if get_ipv6_loopback_address(LOOPBACK_INTERFACE, "Loopback0") != 'None' %} {% if ( ('localhost' in DEVICE_METADATA) and ('bgp_adv_lo_prefix_as_128' in DEVICE_METADATA['localhost']) and @@ -96,17 +93,11 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} bgp router-id {{ lo4096_ipv4 }} {% endif %} {% else %} -{% if "localhost" in DEVICE_METADATA and "bgp_router_id" in DEVICE_METADATA["localhost"] %} - bgp router-id {{ DEVICE_METADATA["localhost"]["bgp_router_id"] }} -{% elif lo0_ipv4 is not none%} - bgp router-id {{ lo0_ipv4 }} -{% endif %} + bgp router-id {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }} {% endif %} ! {# advertise loopback #} -{% if lo0_ipv4 is not none %} - network {{ lo0_ipv4 }}/32 -{% endif %} + network {{ get_ipv4_loopback_address(LOOPBACK_INTERFACE, "Loopback0") | ip }}/32 {% if lo4096_ipv4 is not none and ((multi_asic is defined and DEVICE_METADATA['localhost']['switch_type'] != 'chassis-packet') or (DEVICE_METADATA['localhost']['switch_type'] == 'voq')) %} network {{ lo4096_ipv4 }}/32 route-map HIDE_INTERNAL {% endif %} diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 index 45c60b817888..08df8adf755a 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/monitors/peer-group.conf.j2 @@ -4,7 +4,7 @@ neighbor BGPMON peer-group {% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'SpineRouter' %} neighbor BGPMON update-source Loopback4096 -{% elif loopback0_ipv4 %} +{% else %} neighbor BGPMON update-source {{ loopback0_ipv4 | ip }} {% endif %} diff --git a/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py b/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py index 26202ebc5016..4d2841e76b88 100644 --- a/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py +++ b/src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py @@ -106,6 +106,7 @@ def __init__(self, common_objs, db_name, table_name, peer_type, check_neig_meta) deps = [ ("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, "localhost/bgp_asn"), + ("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback0"), ("CONFIG_DB", swsscommon.CFG_BGP_DEVICE_GLOBAL_TABLE_NAME, "tsa_enabled"), ("LOCAL", "local_addresses", ""), ("LOCAL", "interfaces", ""), @@ -164,11 +165,9 @@ def add_peer(self, vrf, nbr, data): bgp_asn = self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)["localhost"]["bgp_asn"] # lo0_ipv4 = self.get_lo_ipv4("Loopback0|") - if (lo0_ipv4 is None and "bgp_router_id" - not in self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME)["localhost"]): - log_warn("Loopback0 ipv4 address is not presented yet and bgp_router_id not configured") + if lo0_ipv4 is None: + log_warn("Loopback0 ipv4 address is not presented yet") return False - # if self.peer_type == 'internal': lo4096_ipv4 = self.get_lo_ipv4("Loopback4096|") @@ -202,11 +201,10 @@ def add_peer(self, vrf, nbr, data): 'vrf': vrf, 'neighbor_addr': nbr, 'bgp_session': data, + 'loopback0_ipv4': lo0_ipv4, 'CONFIG_DB__LOOPBACK_INTERFACE':{ tuple(key.split('|')) : {} for key in self.directory.get_slot("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME) if '|' in key } } - if lo0_ipv4 is not None: - kwargs['loopback0_ipv4'] = lo0_ipv4 if self.check_neig_meta: neigmeta = self.directory.get_slot("CONFIG_DB", swsscommon.CFG_DEVICE_NEIGHBOR_METADATA_TABLE_NAME) if 'name' in data and data["name"] not in neigmeta: diff --git a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_without_lo0_ipv4.json b/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_without_lo0_ipv4.json deleted file mode 100644 index da9a5c3db38c..000000000000 --- a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/param_without_lo0_ipv4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "CONFIG_DB__DEVICE_METADATA": { - "localhost": { - "type": "LeafRouter" - } - } -} diff --git a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/result_without_lo0_ipv4.conf b/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/result_without_lo0_ipv4.conf deleted file mode 100644 index ff6f981252cb..000000000000 --- a/src/sonic-bgpcfgd/tests/data/monitors/peer-group.conf/result_without_lo0_ipv4.conf +++ /dev/null @@ -1,15 +0,0 @@ -! -! template: bgpd/templates/BGPMON/peer-group.conf.j2 -! - neighbor BGPMON peer-group - address-family ipv4 - neighbor BGPMON activate - neighbor BGPMON route-map FROM_BGPMON in - neighbor BGPMON route-map TO_BGPMON out - neighbor BGPMON send-community - neighbor BGPMON maximum-prefix 1 - exit-address-family -! -! end of template: bgpd/templates/BGPMON/peer-group.conf.j2 -! - diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf deleted file mode 100644 index 96a30d0ab5df..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.conf +++ /dev/null @@ -1,80 +0,0 @@ -! -! template: bgpd/bgpd.main.conf.j2 -! -! bgp multiple-instance -! -! BGP configuration -! -! TSA configuration -! -ip prefix-list PL_LoopbackV4 permit 55.55.55.55/32 -! -ipv6 prefix-list PL_LoopbackV6 permit fc00::/64 -! -ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24 -! -ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64 -! -ip prefix-list V4_P2P_IP permit 0.0.0.0/0 ge 31 le 31 -! -ipv6 prefix-list V6_P2P_IP permit ::/0 ge 126 le 126 -! -route-map V4_CONNECTED_ROUTES permit 10 - match ip address prefix-list V4_P2P_IP - call HIDE_INTERNAL -! -route-map V6_CONNECTED_ROUTES permit 10 - match ipv6 address prefix-list V6_P2P_IP - call HIDE_INTERNAL -! -route-map HIDE_INTERNAL permit 10 - set community no-export -! -! -router bgp 55555 -! - bgp log-neighbor-changes - bgp suppress-fib-pending - no bgp default ipv4-unicast - no bgp ebgp-requires-policy -! - bgp bestpath as-path multipath-relax -! - bgp graceful-restart restart-time 240 - bgp graceful-restart - bgp graceful-restart preserve-fw-state - bgp graceful-restart select-defer-time 45 -! - bgp router-id 8.8.8.8 -! - network 55.55.55.55/32 - network 55.55.55.56/32 route-map HIDE_INTERNAL -! - address-family ipv6 - network fc00::1/64 - exit-address-family - address-family ipv6 - network fc00::2/128 route-map HIDE_INTERNAL - exit-address-family -! - network 10.10.10.1/24 - address-family ipv6 - network fc01::1/64 - exit-address-family -! - address-family ipv4 - redistribute connected route-map V4_CONNECTED_ROUTES - exit-address-family - address-family ipv6 - redistribute connected route-map V6_CONNECTED_ROUTES - exit-address-family -! - address-family ipv4 - maximum-paths 64 - exit-address-family - address-family ipv6 - maximum-paths 64 - exit-address-family -! -! end of template: bgpd/bgpd.main.conf.j2 -! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.json deleted file mode 100644 index 1074ae707a49..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/defaults_router_id.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "DEVICE_METADATA": { - "localhost": { - "bgp_asn": "55555", - "sub_role": "FrontEnd", - "type": "ToRRouter", - "bgp_router_id": "8.8.8.8" - } - }, - "LOOPBACK_INTERFACE": { - "Loopback0|55.55.55.55/32": {}, - "Loopback0|fc00::1/128": {}, - "Loopback4096|55.55.55.56/32": {}, - "Loopback4096|fc00::2/128": {} - }, - "VLAN_INTERFACE": { - "Vlan10|10.10.10.1/24": {}, - "Vlan10|fc01::1/64": {}, - "Vlan20": {"vnet_name": "Vnet1"}, - "Vlan20|20.20.20.1/24": {}, - "Vlan20|fd01::1/64": {} - }, - "constants": { - "bgp": { - "multipath_relax": { - "enabled": true - }, - "graceful_restart": { - "enabled": true - }, - "maximum_paths": { - "enabled": true - } - } - } -} diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf deleted file mode 100644 index b181dbd5e430..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.conf +++ /dev/null @@ -1,75 +0,0 @@ -! -! template: bgpd/bgpd.main.conf.j2 -! -! bgp multiple-instance -! -! BGP configuration -! -! TSA configuration -! -ipv6 prefix-list PL_LoopbackV6 permit fc00::/64 -! -ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24 -! -ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64 -! -ip prefix-list V4_P2P_IP permit 0.0.0.0/0 ge 31 le 31 -! -ipv6 prefix-list V6_P2P_IP permit ::/0 ge 126 le 126 -! -route-map V4_CONNECTED_ROUTES permit 10 - match ip address prefix-list V4_P2P_IP - call HIDE_INTERNAL -! -route-map V6_CONNECTED_ROUTES permit 10 - match ipv6 address prefix-list V6_P2P_IP - call HIDE_INTERNAL -! -route-map HIDE_INTERNAL permit 10 - set community no-export -! -! -router bgp 55555 -! - bgp log-neighbor-changes - bgp suppress-fib-pending - no bgp default ipv4-unicast - no bgp ebgp-requires-policy -! - bgp bestpath as-path multipath-relax -! - bgp graceful-restart restart-time 480 - bgp graceful-restart - bgp graceful-restart preserve-fw-state - bgp graceful-restart select-defer-time 45 -! - network 55.55.55.56/32 route-map HIDE_INTERNAL -! - address-family ipv6 - network fc00::1/64 - exit-address-family - address-family ipv6 - network fc00::2/128 route-map HIDE_INTERNAL - exit-address-family -! - network 10.10.10.1/24 - address-family ipv6 - network fc01::1/64 - exit-address-family -! - address-family ipv4 - redistribute connected route-map V4_CONNECTED_ROUTES - exit-address-family - address-family ipv6 - redistribute connected route-map V6_CONNECTED_ROUTES - exit-address-family -! - address-family ipv4 - maximum-paths 32 - exit-address-family - address-family ipv6 - maximum-paths 32 - exit-address-family -! -! end of template: bgpd/bgpd.main.conf.j2 -! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.json deleted file mode 100644 index 3378029bdc1f..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "DEVICE_METADATA": { - "localhost": { - "bgp_asn": "55555", - "sub_role": "FrontEnd", - "type": "ToRRouter" - } - }, - "LOOPBACK_INTERFACE": { - "Loopback0|fc00::1/128": {}, - "Loopback4096|55.55.55.56/32": {}, - "Loopback4096|fc00::2/128": {} - }, - "VLAN_INTERFACE": { - "Vlan10|10.10.10.1/24": {}, - "Vlan10|fc01::1/64": {}, - "Vlan20": {"vnet_name": "Vnet1"}, - "Vlan20|20.20.20.1/24": {}, - "Vlan20|fd01::1/64": {} - }, - "constants": { - "bgp": { - "multipath_relax": { - "enabled": true - }, - "graceful_restart": { - "enabled": true, - "restart_time": 480 - }, - "maximum_paths": { - "enabled": true, - "ipv4": 32, - "ipv6": 32 - } - } - } -} diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf deleted file mode 100644 index c41fa0cfedc9..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf +++ /dev/null @@ -1,77 +0,0 @@ -! -! template: bgpd/bgpd.main.conf.j2 -! -! bgp multiple-instance -! -! BGP configuration -! -! TSA configuration -! -ipv6 prefix-list PL_LoopbackV6 permit fc00::/64 -! -ip prefix-list LOCAL_VLAN_IPV4_PREFIX seq 5 permit 10.10.10.0/24 -! -ipv6 prefix-list LOCAL_VLAN_IPV6_PREFIX seq 10 permit fc01::/64 -! -ip prefix-list V4_P2P_IP permit 0.0.0.0/0 ge 31 le 31 -! -ipv6 prefix-list V6_P2P_IP permit ::/0 ge 126 le 126 -! -route-map V4_CONNECTED_ROUTES permit 10 - match ip address prefix-list V4_P2P_IP - call HIDE_INTERNAL -! -route-map V6_CONNECTED_ROUTES permit 10 - match ipv6 address prefix-list V6_P2P_IP - call HIDE_INTERNAL -! -route-map HIDE_INTERNAL permit 10 - set community no-export -! -! -router bgp 55555 -! - bgp log-neighbor-changes - bgp suppress-fib-pending - no bgp default ipv4-unicast - no bgp ebgp-requires-policy -! - bgp bestpath as-path multipath-relax -! - bgp graceful-restart restart-time 240 - bgp graceful-restart - bgp graceful-restart preserve-fw-state - bgp graceful-restart select-defer-time 45 -! - bgp router-id 8.8.8.8 -! - network 55.55.55.56/32 route-map HIDE_INTERNAL -! - address-family ipv6 - network fc00::1/64 - exit-address-family - address-family ipv6 - network fc00::2/128 route-map HIDE_INTERNAL - exit-address-family -! - network 10.10.10.1/24 - address-family ipv6 - network fc01::1/64 - exit-address-family -! - address-family ipv4 - redistribute connected route-map V4_CONNECTED_ROUTES - exit-address-family - address-family ipv6 - redistribute connected route-map V6_CONNECTED_ROUTES - exit-address-family -! - address-family ipv4 - maximum-paths 64 - exit-address-family - address-family ipv6 - maximum-paths 64 - exit-address-family -! -! end of template: bgpd/bgpd.main.conf.j2 -! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.json deleted file mode 100644 index b400740e3b49..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/bgpd.main.conf.j2/lo0_ipv6_only_router_id.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "DEVICE_METADATA": { - "localhost": { - "bgp_asn": "55555", - "sub_role": "FrontEnd", - "type": "ToRRouter", - "bgp_router_id": "8.8.8.8" - } - }, - "LOOPBACK_INTERFACE": { - "Loopback0|fc00::1/128": {}, - "Loopback4096|55.55.55.56/32": {}, - "Loopback4096|fc00::2/128": {} - }, - "VLAN_INTERFACE": { - "Vlan10|10.10.10.1/24": {}, - "Vlan10|fc01::1/64": {}, - "Vlan20": {"vnet_name": "Vnet1"}, - "Vlan20|20.20.20.1/24": {}, - "Vlan20|fd01::1/64": {} - }, - "constants": { - "bgp": { - "multipath_relax": { - "enabled": true - }, - "graceful_restart": { - "enabled": true - }, - "maximum_paths": { - "enabled": true - } - } - } -} diff --git a/src/sonic-bgpcfgd/tests/test_bgp.py b/src/sonic-bgpcfgd/tests/test_bgp.py index 32520e76c9b4..5eeaab366fa2 100644 --- a/src/sonic-bgpcfgd/tests/test_bgp.py +++ b/src/sonic-bgpcfgd/tests/test_bgp.py @@ -21,7 +21,7 @@ def load_constant_files(): return constant_files -def constructor(constants_path, with_lo0_ipv4=True, bgp_router_id="", peer_type="general", with_lo4096_ipv4=False): +def constructor(constants_path, bgp_router_id="", peer_type="general", with_lo4096_ipv4=False): cfg_mgr = MagicMock() constants = load_constants(constants_path)['constants'] common_objs = { @@ -45,10 +45,9 @@ def constructor(constants_path, with_lo0_ipv4=True, bgp_router_id="", peer_type= if len(bgp_router_id) != 0: localhost_obj["bgp_router_id"] = bgp_router_id m.directory.put("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, "localhost", localhost_obj) - if with_lo0_ipv4: - m.directory.put("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback0|11.11.11.11/32", {}) if with_lo4096_ipv4: m.directory.put("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback4096|11.11.11.11/32", {}) + m.directory.put("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback0|11.11.11.11/32", {}) m.directory.put("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback0|FC00:1::32/128", {}) m.directory.put("LOCAL", "local_addresses", "30.30.30.30", {"interface": "Ethernet4|30.30.30.30/24"}) m.directory.put("LOCAL", "local_addresses", "fc00:20::20", {"interface": "Ethernet8|fc00:20::20/96"}) @@ -130,24 +129,6 @@ def test_add_peer_internal_router_id_no_lo4096(): res = m.set_handler("30.30.30.1", {'asn': '65200', 'holdtime': '180', 'keepalive': '60', 'local_addr': '30.30.30.30', 'name': 'TOR', 'nhopself': '0', 'rrclient': '0'}) assert res, "Expect True return value" -def test_add_peer_router_id(): - for constant in load_constant_files(): - m = constructor(constant, bgp_router_id="8.8.8.8") - res = m.set_handler("30.30.30.1", {'asn': '65200', 'holdtime': '180', 'keepalive': '60', 'local_addr': '30.30.30.30', 'name': 'TOR', 'nhopself': '0', 'rrclient': '0'}) - assert res, "Expect True return value" - -def test_add_peer_without_lo_ipv4(): - for constant in load_constant_files(): - m = constructor(constant, with_lo0_ipv4=False) - res = m.set_handler("30.30.30.1", {'asn': '65200', 'holdtime': '180', 'keepalive': '60', 'local_addr': '30.30.30.30', 'name': 'TOR', 'nhopself': '0', 'rrclient': '0'}) - assert not res, "Expect False return value" - -def test_add_peer_without_lo_ipv4_router_id(): - for constant in load_constant_files(): - m = constructor(constant, with_lo0_ipv4=False, bgp_router_id="8.8.8.8") - res = m.set_handler("30.30.30.1", {'asn': '65200', 'holdtime': '180', 'keepalive': '60', 'local_addr': '30.30.30.30', 'name': 'TOR', 'nhopself': '0', 'rrclient': '0'}) - assert res, "Expect True return value" - def test_add_peer_ipv6(): for constant in load_constant_files(): m = constructor(constant) diff --git a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py index 22a810bce6dd..674bc3f6f955 100644 --- a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py +++ b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py @@ -156,24 +156,6 @@ def test_bgp_conf_all(): "bgpd.conf.j2/all.json", "bgpd.conf.j2/all.conf") -def test_bgpd_main_conf_lo0_ipv6_only(): - run_test("Base bgpd.main.conf.j2", - "bgpd/bgpd.main.conf.j2", - "bgpd.main.conf.j2/lo0_ipv6_only.json", - "bgpd.main.conf.j2/lo0_ipv6_only.conf") - -def test_bgpd_main_conf_lo0_ipv6_only_router_id(): - run_test("Base bgpd.main.conf.j2", - "bgpd/bgpd.main.conf.j2", - "bgpd.main.conf.j2/lo0_ipv6_only_router_id.json", - "bgpd.main.conf.j2/lo0_ipv6_only_router_id.conf") - -def test_bgpd_main_conf_defaults_router_id(): - run_test("Defaults bgpd.main.conf.j2", - "bgpd/bgpd.main.conf.j2", - "bgpd.main.conf.j2/defaults_router_id.json", - "bgpd.main.conf.j2/defaults_router_id.conf") - def test_bgp_conf_packet_chassis_ipv6_lo4096(): run_test("packet chassis ipv6 loopback4096 bgpd.main.conf.j2", "bgpd/bgpd.main.conf.j2",