Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 3a71ad4

Browse files
hasan-brcmGerrit Code Review
authored and
Gerrit Code Review
committed
Merge "[JIRA SONIC-694] Placeholder for VRF Lite support Minigraph migration and jinja2 template changes for INTF_PREFIX_TABLE changes from PRs: sonic-net#2848" into broadcom_sonic
2 parents 983ce16 + d5e8193 commit 3a71ad4

File tree

17 files changed

+58
-43
lines changed

17 files changed

+58
-43
lines changed

dockers/docker-dhcp-relay/docker-dhcp-relay.supervisord.conf.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ isc-dhcp-relay-{{ vlan_name }}
4747
{%- if VLAN[vlan_name]['dhcp_servers'] -%}
4848
[program:isc-dhcp-relay-{{ vlan_name }}]
4949
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -i {{ vlan_name }}
50-
{%- for (name, prefix) in INTERFACE -%}
50+
{%- for (name, prefix) in INTERFACE|pfx_filter -%}
5151
{%- if prefix | ipv4 %} -i {{ name }}{% endif -%}
5252
{%- endfor -%}
53-
{%- for (name, prefix) in PORTCHANNEL_INTERFACE -%}
53+
{%- for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter -%}
5454
{%- if prefix | ipv4 %} -i {{ name }}{% endif -%}
5555
{%- endfor -%}
5656
{%- for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %} {{ dhcp_server }}{% endfor %}

dockers/docker-dhcp-relay/wait_for_intf.sh.j2

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function wait_until_iface_ready
2929

3030

3131
# Wait for all interfaces to be up and ready
32-
{% for (name, prefix) in INTERFACE %}
32+
{% for (name, prefix) in INTERFACE|pfx_filter %}
3333
wait_until_iface_ready ${PORT_TABLE_PREFIX} {{ name }}
3434
{% endfor %}
35-
{% for (name, prefix) in VLAN_INTERFACE %}
35+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
3636
wait_until_iface_ready ${VLAN_TABLE_PREFIX} {{ name }}
3737
{% endfor %}
38-
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
38+
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
3939
wait_until_iface_ready ${LAG_TABLE_PREFIX} {{ name }}
4040
{% endfor %}

dockers/docker-fpm-frr/bgpd.conf.j2

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
2929
no bgp default ipv4-unicast
3030
bgp graceful-restart restart-time 240
3131
bgp graceful-restart
32-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
32+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
3333
{% if prefix | ipv4 and name == 'Loopback0' %}
3434
bgp router-id {{ prefix | ip }}
3535
{% endif %}
3636
{% endfor %}
3737
{# advertise loopback #}
38-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
38+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
3939
{% if prefix | ipv4 and name == 'Loopback0' %}
4040
network {{ prefix | ip }}/32
4141
{% elif prefix | ipv6 and name == 'Loopback0' %}
@@ -47,7 +47,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
4747
{% endblock bgp_init %}
4848
{% endif %}
4949
{% block vlan_advertisement %}
50-
{% for (name, prefix) in VLAN_INTERFACE %}
50+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
5151
{% if prefix | ipv4 %}
5252
network {{ prefix }}
5353
{% elif prefix | ipv6 %}
@@ -108,7 +108,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
108108
{% if bgp_peer['src_address'] is defined %}
109109
neighbor {{ bgp_peer['name'] }} update-source {{ bgp_peer['src_address'] | ip }}
110110
{% else %}
111-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
111+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
112112
{% if name == 'Loopback1' %}
113113
neighbor {{ bgp_peer['name'] }} update-source {{ prefix | ip }}
114114
{% endif %}

dockers/docker-fpm-frr/frr.conf.j2

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ log facility local4
1616
!
1717
{% block interfaces %}
1818
! Enable link-detect (default disabled)
19-
{% for (name, prefix) in INTERFACE %}
19+
{% for (name, prefix) in INTERFACE|pfx_filter %}
2020
interface {{ name }}
2121
link-detect
2222
!
@@ -30,7 +30,7 @@ link-detect
3030
!
3131
{% block default_route %}
3232
! set static default route to mgmt gateway as a backup to learned default
33-
{% for (name, prefix) in MGMT_INTERFACE %}
33+
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
3434
{% if prefix | ipv4 %}
3535
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
3636
{% endif %}
@@ -41,7 +41,7 @@ ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
4141
{% set lo_ipv4_addrs = [] %}
4242
{% set lo_ipv6_addrs = [] %}
4343
{% if LOOPBACK_INTERFACE %}
44-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
44+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
4545
{% if name == 'Loopback0' %}
4646
{% if prefix | ipv6 %}
4747
{% if lo_ipv6_addrs.append(prefix) %}
@@ -87,13 +87,13 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
8787
{% if DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
8888
bgp graceful-restart
8989
{% endif %}
90-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
90+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
9191
{% if prefix | ipv4 and name == 'Loopback0' %}
9292
bgp router-id {{ prefix | ip }}
9393
{% endif %}
9494
{% endfor %}
9595
{# advertise loopback #}
96-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
96+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
9797
{% if prefix | ipv4 and name == 'Loopback0' %}
9898
network {{ prefix | ip }}/32
9999
{% elif prefix | ipv6 and name == 'Loopback0' %}
@@ -105,7 +105,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
105105
{% endblock bgp_init %}
106106
{% endif %}
107107
{% block vlan_advertisement %}
108-
{% for (name, prefix) in VLAN_INTERFACE %}
108+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
109109
{% if prefix | ipv4 %}
110110
network {{ prefix }}
111111
{% elif prefix | ipv6 %}
@@ -173,7 +173,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
173173
neighbor {{ bgp_peer['name'] }} passive
174174
neighbor {{ bgp_peer['name'] }} remote-as {{ deployment_id_asn_map[DEVICE_METADATA['localhost']['deployment_id']] }}
175175
neighbor {{ bgp_peer['name'] }} ebgp-multihop 255
176-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
176+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
177177
{% if name == 'Loopback1' %}
178178
neighbor {{ bgp_peer['name'] }} update-source {{ prefix | ip }}
179179
{% endif %}

dockers/docker-fpm-frr/zebra.conf.j2

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enable password zebra
1414
!
1515
{% block interfaces %}
1616
! Enable link-detect (default disabled)
17-
{% for (name, prefix) in INTERFACE %}
17+
{% for (name, prefix) in INTERFACE|pfx_filter %}
1818
interface {{ name }}
1919
link-detect
2020
!
@@ -28,7 +28,7 @@ link-detect
2828
!
2929
{% block default_route %}
3030
! set static default route to mgmt gateway as a backup to learned default
31-
{% for (name, prefix) in MGMT_INTERFACE %}
31+
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
3232
{% if prefix | ipv4 %}
3333
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
3434
{% endif %}
@@ -39,7 +39,7 @@ ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
3939
{% set lo_ipv4_addrs = [] %}
4040
{% set lo_ipv6_addrs = [] %}
4141
{% if LOOPBACK_INTERFACE %}
42-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
42+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
4343
{% if name == 'Loopback0' %}
4444
{% if prefix | ipv6 %}
4545
{% if lo_ipv6_addrs.append(prefix) %}

dockers/docker-fpm-quagga/bgpd.conf.j2

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
2929
no bgp default ipv4-unicast
3030
bgp graceful-restart restart-time 240
3131
bgp graceful-restart
32-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
32+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
3333
{% if prefix | ipv4 and name == 'Loopback0' %}
3434
bgp router-id {{ prefix | ip }}
3535
{% endif %}
3636
{% endfor %}
3737
{# advertise loopback #}
38-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
38+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
3939
{% if prefix | ipv4 and name == 'Loopback0' %}
4040
network {{ prefix | ip }}/32
4141
{% elif prefix | ipv6 and name == 'Loopback0' %}
@@ -47,7 +47,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
4747
{% endblock bgp_init %}
4848
{% endif %}
4949
{% block vlan_advertisement %}
50-
{% for (name, prefix) in VLAN_INTERFACE %}
50+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
5151
{% if prefix | ipv4 %}
5252
network {{ prefix }}
5353
{% elif prefix | ipv6 %}
@@ -108,7 +108,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
108108
{% if bgp_peer['src_address'] is defined %}
109109
neighbor {{ bgp_peer['name'] }} update-source {{ bgp_peer['src_address'] | ip }}
110110
{% else %}
111-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
111+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
112112
{% if name == 'Loopback1' %}
113113
neighbor {{ bgp_peer['name'] }} update-source {{ prefix | ip }}
114114
{% endif %}

dockers/docker-fpm-quagga/zebra.conf.j2

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ enable password zebra
1414
!
1515
{% block interfaces %}
1616
! Enable link-detect (default disabled)
17-
{% for (name, prefix) in INTERFACE %}
17+
{% for (name, prefix) in INTERFACE|pfx_filter %}
1818
interface {{ name }}
1919
link-detect
2020
!
@@ -28,7 +28,7 @@ link-detect
2828
!
2929
{% block default_route %}
3030
! set static default route to mgmt gateway as a backup to learned default
31-
{% for (name, prefix) in MGMT_INTERFACE %}
31+
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
3232
{% if prefix | ipv4 %}
3333
ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
3434
{% endif %}
@@ -39,7 +39,7 @@ ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200
3939
{% set lo_ipv4_addrs = [] %}
4040
{% set lo_ipv6_addrs = [] %}
4141
{% if LOOPBACK_INTERFACE %}
42-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
42+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
4343
{% if name == 'Loopback0' %}
4444
{% if prefix | ipv6 %}
4545
{% if lo_ipv6_addrs.append(prefix) %}

dockers/docker-orchagent/ipinip.json.j2

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% set ipv6_addresses = [] %}
33
{% set ipv4_loopback_addresses = [] %}
44
{% set ipv6_loopback_addresses = [] %}
5-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
5+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
66
{%- if prefix | ipv4 and name == 'Loopback0' %}
77
{%- set ipv4_addresses = ipv4_addresses.append(prefix) %}
88
{%- set ipv4_loopback_addresses = ipv4_loopback_addresses.append(prefix) %}
@@ -12,23 +12,23 @@
1212
{%- set ipv6_loopback_addresses = ipv6_loopback_addresses.append(prefix) %}
1313
{%- endif %}
1414
{% endfor %}
15-
{% for (name, prefix) in INTERFACE %}
15+
{% for (name, prefix) in INTERFACE|pfx_filter %}
1616
{%- if prefix | ipv4 %}
1717
{%- set ipv4_addresses = ipv4_addresses.append(prefix) %}
1818
{%- endif %}
1919
{%- if prefix | ipv6 %}
2020
{%- set ipv6_addresses = ipv6_addresses.append(prefix) %}
2121
{%- endif %}
2222
{% endfor %}
23-
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
23+
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
2424
{%- if prefix | ipv4 %}
2525
{%- set ipv4_addresses = ipv4_addresses.append(prefix) %}
2626
{%- endif %}
2727
{%- if prefix | ipv6 %}
2828
{%- set ipv6_addresses = ipv6_addresses.append(prefix) %}
2929
{%- endif %}
3030
{% endfor %}
31-
{% for (name, prefix) in VLAN_INTERFACE %}
31+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
3232
{%- if prefix | ipv4 %}
3333
{%- set ipv4_addresses = ipv4_addresses.append(prefix) %}
3434
{%- endif %}

dockers/docker-router-advertiser/radvd.conf.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{% if VLAN_INTERFACE %}
1212
{% set interfaces = [] %}
1313
{% set INTF_CFG = dict() %}
14-
{% for (name, prefix) in VLAN_INTERFACE %}
14+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
1515
{% if prefix | ipv6 %}
1616
{% if name not in INTF_CFG %}
1717
{% set x=INTF_CFG.__setitem__(name, []|list) %}

dockers/docker-router-advertiser/wait_for_intf.sh.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ function wait_until_iface_ready
2727

2828

2929
# Wait for all interfaces to be up and ready
30-
{% for (name, prefix) in VLAN_INTERFACE %}
30+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
3131
wait_until_iface_ready ${VLAN_TABLE_PREFIX} {{ name }}
3232
{% endfor %}

files/image_config/interfaces/interfaces.j2

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
auto lo
1111
iface lo inet loopback
1212
# Use command 'ip addr list dev lo' to check all addresses
13-
{% for (name, prefix) in LOOPBACK_INTERFACE %}
13+
{% if LOOPBACK_INTERFACE %}
14+
{% for (name, prefix) in LOOPBACK_INTERFACE|pfx_filter %}
1415
iface lo {{ 'inet' if prefix | ipv4 else 'inet6' }} static
1516
address {{ prefix | ip }}
1617
netmask {{ prefix | netmask if prefix | ipv4 else prefix | prefixlen }}
1718
#
1819
{% endfor %}
20+
{% endif %}
1921
{% endblock loopback %}
2022
{% block mgmt_interface %}
2123

@@ -50,7 +52,7 @@ iface {{ port }} inet6 dhcp
5052

5153
{% else %}
5254
{% if MGMT_INTERFACE %}
53-
{% for (name, prefix) in MGMT_INTERFACE %}
55+
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
5456
iface eth0 {{ 'inet' if prefix | ipv4 else 'inet6' }} static
5557
address {{ prefix | ip }}
5658
netmask {{ prefix | netmask if prefix | ipv4 else prefix | prefixlen }}

files/image_config/ntp/ntp.conf.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ server {{ ntp_server }} iburst
3030
#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
3131
interface ignore wildcard
3232
{% if MGMT_INTERFACE %}
33-
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE %}
33+
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE|pfx_filter %}
3434
interface listen {{ mgmt_prefix | ip }}
3535
{% endfor %}
3636
{% else %}

files/scripts/arp_update

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
while /bin/true; do
1111
# find L3 interfaces which are UP, send ipv6 multicast pings
12-
echo "{% for (name, prefix) in INTERFACE %} {{name}} {% endfor %}" > /tmp/intf_tmp.j2
12+
echo "{% for (name, prefix) in INTERFACE|pfx_filter %} {{name}} {% endfor %}" > /tmp/intf_tmp.j2
1313
INTERFACE=`sonic-cfggen -d -t /tmp/intf_tmp.j2`
14-
echo "{% for (name, prefix) in PORTCHANNEL_INTERFACE %} {{name}} {% endfor %}" > /tmp/pc_intf_tmp.j2
14+
echo "{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %} {{name}} {% endfor %}" > /tmp/pc_intf_tmp.j2
1515
PC_INTERFACE=`sonic-cfggen -d -t /tmp/pc_intf_tmp.j2`
1616

1717
ALL_INTERFACE="$INTERFACE $PC_INTERFACE"

src/sonic-config-engine/minigraph.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -512,12 +512,16 @@ def parse_xml(filename, platform=None, port_config_file=None):
512512
for intf in intfs:
513513
if intf[0][0:4] == 'Vlan':
514514
vlan_intfs[intf] = {}
515+
vlan_intfs[intf[0]] = {}
515516
elif vlan_invert_mapping.has_key(intf[0]):
516517
vlan_intfs[(vlan_invert_mapping[intf[0]], intf[1])] = {}
518+
vlan_intfs[vlan_invert_mapping[intf[0]]] = {}
517519
elif intf[0][0:11] == 'PortChannel':
518520
pc_intfs[intf] = {}
521+
pc_intfs[intf[0]] = {}
519522
else:
520523
phyport_intfs[intf] = {}
524+
phyport_intfs[intf[0]] = {}
521525

522526
results['INTERFACE'] = phyport_intfs
523527
results['VLAN_INTERFACE'] = vlan_intfs
@@ -598,9 +602,10 @@ def parse_xml(filename, platform=None, port_config_file=None):
598602

599603
for pc_intf in pc_intfs.keys():
600604
# remove portchannels not in PORTCHANNEL dictionary
601-
if pc_intf[0] not in pcs:
605+
if isinstance(pc_intf, tuple) and pc_intf[0] not in pcs:
602606
print >> sys.stderr, "Warning: ignore '%s' interface '%s' as '%s' is not in the valid PortChannel list" % (pc_intf[0], pc_intf[1], pc_intf[0])
603607
del pc_intfs[pc_intf]
608+
pc_intfs.pop(pc_intf[0], None)
604609

605610
results['PORTCHANNEL_INTERFACE'] = pc_intfs
606611

src/sonic-config-engine/sonic-cfggen

+8
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ def unique_name(l):
8686
new_list.append(item)
8787
return new_list
8888

89+
def pfx_filter(value):
90+
table = OrderedDict()
91+
for key,val in value.items():
92+
if not isinstance(key, tuple):
93+
continue
94+
table[key] = val
95+
return table
8996

9097
class FormatConverter:
9198
"""Convert config DB based schema to legacy minigraph based schema for backward capability.
@@ -234,6 +241,7 @@ def main():
234241
env.filters['ipv4'] = is_ipv4
235242
env.filters['ipv6'] = is_ipv6
236243
env.filters['unique_name'] = unique_name
244+
env.filters['pfx_filter'] = pfx_filter
237245
for attr in ['ip', 'network', 'prefixlen', 'netmask']:
238246
env.filters[attr] = partial(prefix_attr, attr)
239247
template = env.get_template(template_file)

src/sonic-config-engine/tests/test_cfggen.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_minigraph_mgmt_ports(self):
107107
def test_minigraph_interfaces(self):
108108
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "INTERFACE.keys()"'
109109
output = self.run_script(argument)
110-
self.assertEqual(output.strip(), "[('Ethernet0', '10.0.0.58/31'), ('Ethernet0', 'FC00::75/126')]")
110+
self.assertEqual(output.strip(), "[('Ethernet0', '10.0.0.58/31'), 'Ethernet0', ('Ethernet0', 'FC00::75/126')]")
111111

112112
def test_minigraph_vlans(self):
113113
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v VLAN'
@@ -122,7 +122,7 @@ def test_minigraph_vlan_members(self):
122122
def test_minigraph_vlan_interfaces(self):
123123
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "VLAN_INTERFACE.keys()"'
124124
output = self.run_script(argument)
125-
self.assertEqual(output.strip(), "[('Vlan1000', '192.168.0.1/27')]")
125+
self.assertEqual(output.strip(), "[('Vlan1000', '192.168.0.1/27'), 'Vlan1000']")
126126

127127
def test_minigraph_portchannels(self):
128128
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v PORTCHANNEL'
@@ -142,7 +142,7 @@ def test_minigraph_portchannel_members(self):
142142
def test_minigraph_portchannel_interfaces(self):
143143
argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v "PORTCHANNEL_INTERFACE.keys()"'
144144
output = self.run_script(argument)
145-
self.assertEqual(output.strip(), "[('PortChannel01', 'FC00::71/126'), ('PortChannel01', '10.0.0.56/31')]")
145+
self.assertEqual(output.strip(), "['PortChannel01', ('PortChannel01', '10.0.0.56/31'), ('PortChannel01', 'FC00::71/126')]")
146146

147147
def test_minigraph_neighbors(self):
148148
argument = '-m "' + self.sample_graph_t0 + '" -p "' + self.port_config + '" -v "DEVICE_NEIGHBOR[\'Ethernet124\']"'

0 commit comments

Comments
 (0)