From 5eda7dbb38a7f6526e7bfe0f8b0c85c9aee2281d Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Tue, 27 Jul 2021 18:55:45 +0000 Subject: [PATCH 1/8] Add DHCP table --- src/sonic-config-engine/minigraph.py | 29 +++++++++++++++++-- .../tests/simple-sample-graph-case.xml | 12 ++++++++ src/sonic-config-engine/tests/test_cfggen.py | 11 +++++++ .../tests/test_minigraph_case.py | 23 +++++++++++++++ 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 73d1964c0086..fb82a5101181 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -577,6 +577,28 @@ def parse_dpg(dpg, hname): vlan_attributes['alias'] = vintfname vlans[sonic_vlan_name] = vlan_attributes + dhcp = child.find(str(QName(ns, "Dhcp"))) + dhcp_table = {} + + for vintf in dhcp.findall(str(QName(ns, "VlanInterface"))): + vintfname = vintf.find(str(QName(ns, "Name"))).text + + dhcp_attributes = {} + + dhcp_node = vintf.find(str(QName(ns, "Dhcpv6Relays"))) + if dhcp_node is not None and dhcp_node.text is not None: + dhcpservers = dhcp_node.text + vdhcpserver_list = dhcpservers.split(';') + dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list + + option_linklayer_addr = vintf.find(str(QName(ns, "Dhcpv6OptionLinkLayerAddr"))) + if option_linklayer_addr is not None and option_linklayer_addr.text == "true": + dhcp_attributes['dhcpv6_option|link_layer_addr'] = "true" + elif option_linklayer_addr is not None and option_linklayer_addr.text == "false": + dhcp_attributes['dhcpv6_option|link_layer_addr'] = "false" + + dhcp_table[vintfname] = dhcp_attributes + acls = {} for aclintf in aclintfs.findall(str(QName(ns, "AclInterface"))): if aclintf.find(str(QName(ns, "InAcl"))) is not None: @@ -691,7 +713,7 @@ def parse_dpg(dpg, hname): if mg_key in mg_tunnel.attrib: tunnelintfs[tunnel_type][tunnel_name][table_key] = mg_tunnel.attrib[mg_key] - return intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, pcs, pc_members, acls, vni, tunnelintfs, dpg_ecmp_content + return intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, dhcp_table, pcs, pc_members, acls, vni, tunnelintfs, dpg_ecmp_content return None, None, None, None, None, None, None, None, None, None, None, None, None def parse_host_loopback(dpg, hname): @@ -1159,6 +1181,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw tunnel_intfs = None vlans = None vlan_members = None + dhcp_table = None pcs = None mgmt_intf = None voq_inband_intfs = None @@ -1217,7 +1240,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw for child in root: if asic_name is None: if child.tag == str(QName(ns, "DpgDec")): - (intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, pcs, pc_members, acls, vni, tunnel_intfs, dpg_ecmp_content) = parse_dpg(child, hostname) + (intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, dhcp_table, pcs, pc_members, acls, vni, tunnel_intfs, dpg_ecmp_content) = parse_dpg(child, hostname) elif child.tag == str(QName(ns, "CpgDec")): (bgp_sessions, bgp_internal_sessions, bgp_voq_chassis_sessions, bgp_asn, bgp_peers_with_range, bgp_monitors) = parse_cpg(child, hostname) elif child.tag == str(QName(ns, "PngDec")): @@ -1575,7 +1598,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw results['DEVICE_NEIGHBOR_METADATA'] = { key:devices[key] for key in devices if key in {device['name'] for device in neighbors.values()} } results['SYSLOG_SERVER'] = dict((item, {}) for item in syslog_servers) results['DHCP_SERVER'] = dict((item, {}) for item in dhcp_servers) - results['DHCPv6_SERVER'] = dict((item, {}) for item in dhcpv6_servers) + results['DHCP'] = dhcp_table results['NTP_SERVER'] = dict((item, {}) for item in ntp_servers) results['TACPLUS_SERVER'] = dict((item, {'priority': '1', 'tcp_port': '49'}) for item in tacacs_servers) results['ACL_TABLE'] = filter_acl_table_bindings(acls, neighbors, pcs, sub_role) diff --git a/src/sonic-config-engine/tests/simple-sample-graph-case.xml b/src/sonic-config-engine/tests/simple-sample-graph-case.xml index c1015b6b5362..73a5a267709b 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-case.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-case.xml @@ -148,6 +148,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index eff8324d6fd2..c3bea3d3d513 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -786,3 +786,14 @@ def test_minigraph_voq_inband_interface(self): 'Vlan3094|1.1.1.1/24': {} } ) + + def test_minigraph_dhcp(self): + argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v DHCP' + output = self.run_script(argument) + self.assertEqual( + utils.to_dict(output.strip()), + utils.to_dict( + "{'Vlan1000': {'dhcpv6_servers': ['fc02:2000::1', 'fc02:2000::2'], 'dhcpv6_option|link_layer_addr': 'true'}, " + "'Vlan2000': {'dhcpv6_servers': ['fc02:2000::3', 'fc02:2000::4'], 'dhcpv6_option|link_layer_addr': 'false'}}" + ) + ) \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 08bde40af0cf..ac18ae5df183 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -357,3 +357,26 @@ def test_minigraph_mux_cable_table(self): utils.to_dict(output.strip()), expected_table ) + + def test_dhcp_table(self): + argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "DHCP"' + expected = { + 'Vlan1000': { + 'dhcpv6_servers': [ + "fc02:2000::1", + "fc02:2000::2" + ], + 'dhcpv6_option|link_layer_addr': "true" + }, + 'Vlan2000': { + 'dhcpv6_servers': [ + "fc02:2000::3", + "fc02:2000::4" + ], + 'dhcpv6_option|link_layer_addr': "false" + } + self.assertEqual( + utils.to_dict(output.strip()), + expected + ) + \ No newline at end of file From 506f921f2fdebc23c7734ce71f0a626dc62b7df1 Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Tue, 27 Jul 2021 20:00:32 +0000 Subject: [PATCH 2/8] Update test_minigraph_case --- src/sonic-config-engine/tests/test_minigraph_case.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index ac18ae5df183..6678a6817492 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -366,15 +366,16 @@ def test_dhcp_table(self): "fc02:2000::1", "fc02:2000::2" ], - 'dhcpv6_option|link_layer_addr': "true" + 'dhcpv6_option|link_layer_addr': 'true' }, 'Vlan2000': { 'dhcpv6_servers': [ "fc02:2000::3", "fc02:2000::4" ], - 'dhcpv6_option|link_layer_addr': "false" + 'dhcpv6_option|link_layer_addr': 'false' } + output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), expected From 2d8bf363a875314d2bd8b2877e8cd035a65c4ef3 Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Tue, 27 Jul 2021 20:02:12 +0000 Subject: [PATCH 3/8] Added new lines at the end --- src/sonic-config-engine/tests/test_cfggen.py | 3 ++- src/sonic-config-engine/tests/test_minigraph_case.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index c3bea3d3d513..af2afcd2562f 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -796,4 +796,5 @@ def test_minigraph_dhcp(self): "{'Vlan1000': {'dhcpv6_servers': ['fc02:2000::1', 'fc02:2000::2'], 'dhcpv6_option|link_layer_addr': 'true'}, " "'Vlan2000': {'dhcpv6_servers': ['fc02:2000::3', 'fc02:2000::4'], 'dhcpv6_option|link_layer_addr': 'false'}}" ) - ) \ No newline at end of file + ) + \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 6678a6817492..bf9392258a82 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -380,4 +380,5 @@ def test_dhcp_table(self): utils.to_dict(output.strip()), expected ) + \ No newline at end of file From 11b6233471c15f909cacc198bb5690798702faaa Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Tue, 27 Jul 2021 21:54:08 +0000 Subject: [PATCH 4/8] Updated simple-graph --- src/sonic-config-engine/tests/simple-sample-graph-case.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sonic-config-engine/tests/simple-sample-graph-case.xml b/src/sonic-config-engine/tests/simple-sample-graph-case.xml index 73a5a267709b..41e0de8b80a0 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-case.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-case.xml @@ -148,7 +148,7 @@ - + Vlan1000 fc02:2000::1;fc02:2000::2 @@ -159,7 +159,7 @@ fc02:2000::3;fc02:2000::4 false - + From 1e7d54fc559e5ba296bd307a1d80498208126ca4 Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Wed, 28 Jul 2021 18:08:25 -0700 Subject: [PATCH 5/8] Update test_minigraph_case.py --- src/sonic-config-engine/tests/test_minigraph_case.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index bf9392258a82..6176e7de268e 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -375,10 +375,11 @@ def test_dhcp_table(self): ], 'dhcpv6_option|link_layer_addr': 'false' } + } output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), expected ) - \ No newline at end of file + From 165403df8d8204c1eb75bef3ea7e84ba4ac93543 Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Thu, 29 Jul 2021 17:49:07 +0000 Subject: [PATCH 6/8] Added dhcp table too all xml files --- src/sonic-config-engine/minigraph.py | 2 +- .../tests/fg-ecmp-sample-minigraph.xml | 12 ++++ .../sample-minigraph-noportchannel.xml | 60 +++++++++++++++++++ .../tests/multi_npu_data/sample-minigraph.xml | 60 +++++++++++++++++++ .../tests/pc-test-graph.xml | 12 ++++ .../tests/sample-arista-7050-t0-minigraph.xml | 12 ++++ .../tests/sample-dell-6100-t0-minigraph.xml | 12 ++++ .../tests/sample-graph-resource-type.xml | 12 ++++ .../tests/sample-graph-subintf.xml | 12 ++++ .../tests/sample-voq-graph.xml | 12 ++++ .../tests/sample_graph.xml | 12 ++++ .../tests/simple-sample-graph-metadata.xml | 12 ++++ .../tests/simple-sample-graph.xml | 12 ++++ .../tests/t0-sample-bgp-speaker.xml | 12 ++++ .../tests/t0-sample-graph-mvrf.xml | 12 ++++ .../tests/t0-sample-graph.xml | 12 ++++ .../tests/t1-sample-graph-mlnx.xml | 12 ++++ .../tests/t2-chassis-fe-graph-pc.xml | 12 ++++ .../tests/t2-chassis-fe-graph-vni.xml | 12 ++++ .../tests/t2-chassis-fe-graph.xml | 12 ++++ 20 files changed, 325 insertions(+), 1 deletion(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index fb82a5101181..eacc0a4e1730 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -1255,7 +1255,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw (port_speeds_default, port_descriptions, sys_ports) = parse_deviceinfo(child, hwsku) else: if child.tag == str(QName(ns, "DpgDec")): - (intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, pcs, pc_members, acls, vni, tunnel_intfs, dpg_ecmp_content) = parse_dpg(child, asic_name) + (intfs, lo_intfs, mvrf, mgmt_intf, voq_inband_intfs, vlans, vlan_members, dhcp_table, pcs, pc_members, acls, vni, tunnel_intfs, dpg_ecmp_content) = parse_dpg(child, asic_name) host_lo_intfs = parse_host_loopback(child, hostname) elif child.tag == str(QName(ns, "CpgDec")): (bgp_sessions, bgp_internal_sessions, bgp_voq_chassis_sessions, bgp_asn, bgp_peers_with_range, bgp_monitors) = parse_cpg(child, asic_name, local_devices) diff --git a/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml b/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml index 9cca45e25241..f6cb99710d70 100644 --- a/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml +++ b/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml @@ -231,6 +231,18 @@ 192.168.0.0/21 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml index 460f71e21c2a..62653aa22be5 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml @@ -318,6 +318,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + @@ -429,6 +441,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -511,6 +535,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -593,6 +629,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -655,6 +703,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml index 5dac8e95bf1a..e228cde00e21 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml @@ -328,6 +328,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + @@ -430,6 +442,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -507,6 +531,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -579,6 +615,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface @@ -641,6 +689,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface diff --git a/src/sonic-config-engine/tests/pc-test-graph.xml b/src/sonic-config-engine/tests/pc-test-graph.xml index 6709d65c4969..a2f3324d2824 100644 --- a/src/sonic-config-engine/tests/pc-test-graph.xml +++ b/src/sonic-config-engine/tests/pc-test-graph.xml @@ -114,6 +114,18 @@ 192.168.0.0/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml index 4d216b30f203..84c1fbb25fe5 100644 --- a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml +++ b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml @@ -198,6 +198,18 @@ 192.168.0.0/21 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml b/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml index 7cea7decfcc0..796e1f03e30d 100644 --- a/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml +++ b/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml @@ -235,6 +235,18 @@ 172.0.0.0/21 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + IPInterface diff --git a/src/sonic-config-engine/tests/sample-graph-resource-type.xml b/src/sonic-config-engine/tests/sample-graph-resource-type.xml index 12961059251d..0ae77dd60a0c 100644 --- a/src/sonic-config-engine/tests/sample-graph-resource-type.xml +++ b/src/sonic-config-engine/tests/sample-graph-resource-type.xml @@ -222,6 +222,18 @@ 192.168.0.240/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/sample-graph-subintf.xml b/src/sonic-config-engine/tests/sample-graph-subintf.xml index f487b989a138..34deec8250f9 100644 --- a/src/sonic-config-engine/tests/sample-graph-subintf.xml +++ b/src/sonic-config-engine/tests/sample-graph-subintf.xml @@ -240,6 +240,18 @@ 192.168.0.240/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/sample-voq-graph.xml b/src/sonic-config-engine/tests/sample-voq-graph.xml index 648f0b2b17a7..aebe71725e90 100644 --- a/src/sonic-config-engine/tests/sample-voq-graph.xml +++ b/src/sonic-config-engine/tests/sample-voq-graph.xml @@ -41,6 +41,18 @@ linecard-1 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/sample_graph.xml b/src/sonic-config-engine/tests/sample_graph.xml index 47efabf7d81c..e8e29c393900 100644 --- a/src/sonic-config-engine/tests/sample_graph.xml +++ b/src/sonic-config-engine/tests/sample_graph.xml @@ -80,6 +80,18 @@ OCPSCH01040DDLF + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml index 80430633b1f8..9614bba76f22 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml @@ -136,6 +136,18 @@ 192.168.0.0/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index 90abd1885bcb..d4da1d70661b 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -222,6 +222,18 @@ 192.168.0.240/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml index f2690985d9f3..1fd1b684ddfe 100644 --- a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml +++ b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml @@ -209,6 +209,18 @@ 192.168.0.0/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml index e7e2b5789816..40be7703dae2 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml @@ -225,6 +225,18 @@ 192.168.0.0/27 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index c06cc708c1ce..117e4a3fa20f 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -306,6 +306,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml index cc6f5e95940b..b94c74ffddfb 100644 --- a/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml +++ b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml @@ -954,6 +954,18 @@ arc-switch1026 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml index bc1a5142fc86..0b6ad3ec4cc8 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml @@ -130,6 +130,18 @@ + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml index 0dc534b3de88..83910589fea2 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml @@ -115,6 +115,18 @@ SpineFront01 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml index 3b0c56a57a70..ab486e377543 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml @@ -114,6 +114,18 @@ SpineFront01 + + + Vlan1000 + fc02:2000::1;fc02:2000::2 + true + + + Vlan2000 + fc02:2000::3;fc02:2000::4 + false + + From 249cb2b020f951521adc23a1bdee665732bda11c Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Thu, 29 Jul 2021 23:28:05 +0000 Subject: [PATCH 7/8] Deleted DHCP table from unnecessary xml files and modified minigrpah.py --- src/sonic-config-engine/minigraph.py | 29 ++++----- .../tests/fg-ecmp-sample-minigraph.xml | 12 ---- .../sample-minigraph-noportchannel.xml | 60 ------------------- .../tests/multi_npu_data/sample-minigraph.xml | 60 ------------------- .../tests/pc-test-graph.xml | 12 ---- .../tests/sample-arista-7050-t0-minigraph.xml | 12 ---- .../tests/sample-dell-6100-t0-minigraph.xml | 12 ---- .../tests/sample-graph-resource-type.xml | 12 ---- .../tests/sample-graph-subintf.xml | 12 ---- .../tests/sample-voq-graph.xml | 12 ---- .../tests/sample_graph.xml | 12 ---- .../tests/simple-sample-graph-metadata.xml | 12 ---- .../tests/simple-sample-graph.xml | 12 ---- .../tests/t0-sample-bgp-speaker.xml | 12 ---- .../tests/t0-sample-graph-mvrf.xml | 12 ---- .../tests/t0-sample-graph.xml | 12 ---- .../tests/t1-sample-graph-mlnx.xml | 12 ---- .../tests/t2-chassis-fe-graph-pc.xml | 12 ---- .../tests/t2-chassis-fe-graph-vni.xml | 12 ---- .../tests/t2-chassis-fe-graph.xml | 12 ---- src/sonic-config-engine/tests/test_cfggen.py | 2 +- 21 files changed, 16 insertions(+), 339 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index eacc0a4e1730..8cd6faf4bf5b 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -580,24 +580,25 @@ def parse_dpg(dpg, hname): dhcp = child.find(str(QName(ns, "Dhcp"))) dhcp_table = {} - for vintf in dhcp.findall(str(QName(ns, "VlanInterface"))): - vintfname = vintf.find(str(QName(ns, "Name"))).text + if dhcp is not None: + for vintf in dhcp.findall(str(QName(ns, "VlanInterface"))): + vintfname = vintf.find(str(QName(ns, "Name"))).text - dhcp_attributes = {} + dhcp_attributes = {} - dhcp_node = vintf.find(str(QName(ns, "Dhcpv6Relays"))) - if dhcp_node is not None and dhcp_node.text is not None: - dhcpservers = dhcp_node.text - vdhcpserver_list = dhcpservers.split(';') - dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list + dhcp_node = vintf.find(str(QName(ns, "Dhcpv6Relays"))) + if dhcp_node is not None and dhcp_node.text is not None: + dhcpservers = dhcp_node.text + vdhcpserver_list = dhcpservers.split(';') + dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list - option_linklayer_addr = vintf.find(str(QName(ns, "Dhcpv6OptionLinkLayerAddr"))) - if option_linklayer_addr is not None and option_linklayer_addr.text == "true": - dhcp_attributes['dhcpv6_option|link_layer_addr'] = "true" - elif option_linklayer_addr is not None and option_linklayer_addr.text == "false": - dhcp_attributes['dhcpv6_option|link_layer_addr'] = "false" + option_linklayer_addr = vintf.find(str(QName(ns, "Dhcpv6OptionLinkLayerAddr"))) + if option_linklayer_addr is not None and option_linklayer_addr.text == "true": + dhcp_attributes['dhcpv6_option|link_layer_addr'] = "true" + elif option_linklayer_addr is not None and option_linklayer_addr.text == "false": + dhcp_attributes['dhcpv6_option|link_layer_addr'] = "false" - dhcp_table[vintfname] = dhcp_attributes + dhcp_table[vintfname] = dhcp_attributes acls = {} for aclintf in aclintfs.findall(str(QName(ns, "AclInterface"))): diff --git a/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml b/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml index f6cb99710d70..9cca45e25241 100644 --- a/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml +++ b/src/sonic-config-engine/tests/fg-ecmp-sample-minigraph.xml @@ -231,18 +231,6 @@ 192.168.0.0/21 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml index 62653aa22be5..460f71e21c2a 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph-noportchannel.xml @@ -318,18 +318,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - @@ -441,18 +429,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -535,18 +511,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -629,18 +593,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -703,18 +655,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface diff --git a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml index e228cde00e21..5dac8e95bf1a 100644 --- a/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml +++ b/src/sonic-config-engine/tests/multi_npu_data/sample-minigraph.xml @@ -328,18 +328,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - @@ -442,18 +430,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -531,18 +507,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -615,18 +579,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface @@ -689,18 +641,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface diff --git a/src/sonic-config-engine/tests/pc-test-graph.xml b/src/sonic-config-engine/tests/pc-test-graph.xml index a2f3324d2824..6709d65c4969 100644 --- a/src/sonic-config-engine/tests/pc-test-graph.xml +++ b/src/sonic-config-engine/tests/pc-test-graph.xml @@ -114,18 +114,6 @@ 192.168.0.0/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml index 84c1fbb25fe5..4d216b30f203 100644 --- a/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml +++ b/src/sonic-config-engine/tests/sample-arista-7050-t0-minigraph.xml @@ -198,18 +198,6 @@ 192.168.0.0/21 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml b/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml index 796e1f03e30d..7cea7decfcc0 100644 --- a/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml +++ b/src/sonic-config-engine/tests/sample-dell-6100-t0-minigraph.xml @@ -235,18 +235,6 @@ 172.0.0.0/21 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - IPInterface diff --git a/src/sonic-config-engine/tests/sample-graph-resource-type.xml b/src/sonic-config-engine/tests/sample-graph-resource-type.xml index 0ae77dd60a0c..12961059251d 100644 --- a/src/sonic-config-engine/tests/sample-graph-resource-type.xml +++ b/src/sonic-config-engine/tests/sample-graph-resource-type.xml @@ -222,18 +222,6 @@ 192.168.0.240/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/sample-graph-subintf.xml b/src/sonic-config-engine/tests/sample-graph-subintf.xml index 34deec8250f9..f487b989a138 100644 --- a/src/sonic-config-engine/tests/sample-graph-subintf.xml +++ b/src/sonic-config-engine/tests/sample-graph-subintf.xml @@ -240,18 +240,6 @@ 192.168.0.240/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/sample-voq-graph.xml b/src/sonic-config-engine/tests/sample-voq-graph.xml index aebe71725e90..648f0b2b17a7 100644 --- a/src/sonic-config-engine/tests/sample-voq-graph.xml +++ b/src/sonic-config-engine/tests/sample-voq-graph.xml @@ -41,18 +41,6 @@ linecard-1 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/sample_graph.xml b/src/sonic-config-engine/tests/sample_graph.xml index e8e29c393900..47efabf7d81c 100644 --- a/src/sonic-config-engine/tests/sample_graph.xml +++ b/src/sonic-config-engine/tests/sample_graph.xml @@ -80,18 +80,6 @@ OCPSCH01040DDLF - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml index 9614bba76f22..80430633b1f8 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-metadata.xml @@ -136,18 +136,6 @@ 192.168.0.0/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml index d4da1d70661b..90abd1885bcb 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph.xml @@ -222,18 +222,6 @@ 192.168.0.240/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml index 1fd1b684ddfe..f2690985d9f3 100644 --- a/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml +++ b/src/sonic-config-engine/tests/t0-sample-bgp-speaker.xml @@ -209,18 +209,6 @@ 192.168.0.0/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml index 40be7703dae2..e7e2b5789816 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph-mvrf.xml @@ -225,18 +225,6 @@ 192.168.0.0/27 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t0-sample-graph.xml b/src/sonic-config-engine/tests/t0-sample-graph.xml index 117e4a3fa20f..c06cc708c1ce 100644 --- a/src/sonic-config-engine/tests/t0-sample-graph.xml +++ b/src/sonic-config-engine/tests/t0-sample-graph.xml @@ -306,18 +306,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml index b94c74ffddfb..cc6f5e95940b 100644 --- a/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml +++ b/src/sonic-config-engine/tests/t1-sample-graph-mlnx.xml @@ -954,18 +954,6 @@ arc-switch1026 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml index 0b6ad3ec4cc8..bc1a5142fc86 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-pc.xml @@ -130,18 +130,6 @@ - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml index 83910589fea2..0dc534b3de88 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph-vni.xml @@ -115,18 +115,6 @@ SpineFront01 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml index ab486e377543..3b0c56a57a70 100644 --- a/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml +++ b/src/sonic-config-engine/tests/t2-chassis-fe-graph.xml @@ -114,18 +114,6 @@ SpineFront01 - - - Vlan1000 - fc02:2000::1;fc02:2000::2 - true - - - Vlan2000 - fc02:2000::3;fc02:2000::4 - false - - diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index af2afcd2562f..fbe68ab40c96 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -788,7 +788,7 @@ def test_minigraph_voq_inband_interface(self): ) def test_minigraph_dhcp(self): - argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v DHCP' + argument = '-m "' + self.sample_graph_simple_case + '" -p "' + self.port_config + '" -v DHCP' output = self.run_script(argument) self.assertEqual( utils.to_dict(output.strip()), From 79b3125ffc843bf6e4b740cd9934926652a20101 Mon Sep 17 00:00:00 2001 From: kellyyeh Date: Tue, 3 Aug 2021 21:20:03 +0000 Subject: [PATCH 8/8] Updated option name --- src/sonic-config-engine/minigraph.py | 6 +++--- src/sonic-config-engine/tests/simple-sample-graph-case.xml | 4 ++-- src/sonic-config-engine/tests/test_cfggen.py | 5 +++-- src/sonic-config-engine/tests/test_minigraph_case.py | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py index 8cd6faf4bf5b..30ba30e4378a 100644 --- a/src/sonic-config-engine/minigraph.py +++ b/src/sonic-config-engine/minigraph.py @@ -592,11 +592,11 @@ def parse_dpg(dpg, hname): vdhcpserver_list = dhcpservers.split(';') dhcp_attributes['dhcpv6_servers'] = vdhcpserver_list - option_linklayer_addr = vintf.find(str(QName(ns, "Dhcpv6OptionLinkLayerAddr"))) + option_linklayer_addr = vintf.find(str(QName(ns, "Dhcpv6OptionRfc6939"))) if option_linklayer_addr is not None and option_linklayer_addr.text == "true": - dhcp_attributes['dhcpv6_option|link_layer_addr'] = "true" + dhcp_attributes['dhcpv6_option|rfc6939_support'] = "true" elif option_linklayer_addr is not None and option_linklayer_addr.text == "false": - dhcp_attributes['dhcpv6_option|link_layer_addr'] = "false" + dhcp_attributes['dhcpv6_option|rfc6939_support'] = "false" dhcp_table[vintfname] = dhcp_attributes diff --git a/src/sonic-config-engine/tests/simple-sample-graph-case.xml b/src/sonic-config-engine/tests/simple-sample-graph-case.xml index 41e0de8b80a0..95398e6913cf 100644 --- a/src/sonic-config-engine/tests/simple-sample-graph-case.xml +++ b/src/sonic-config-engine/tests/simple-sample-graph-case.xml @@ -152,12 +152,12 @@ Vlan1000 fc02:2000::1;fc02:2000::2 - true + true Vlan2000 fc02:2000::3;fc02:2000::4 - false + false diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py index fbe68ab40c96..3a64b0a67a5d 100644 --- a/src/sonic-config-engine/tests/test_cfggen.py +++ b/src/sonic-config-engine/tests/test_cfggen.py @@ -793,8 +793,9 @@ def test_minigraph_dhcp(self): self.assertEqual( utils.to_dict(output.strip()), utils.to_dict( - "{'Vlan1000': {'dhcpv6_servers': ['fc02:2000::1', 'fc02:2000::2'], 'dhcpv6_option|link_layer_addr': 'true'}, " - "'Vlan2000': {'dhcpv6_servers': ['fc02:2000::3', 'fc02:2000::4'], 'dhcpv6_option|link_layer_addr': 'false'}}" + "{'Vlan1000': {'dhcpv6_servers': ['fc02:2000::1', 'fc02:2000::2'], 'dhcpv6_option|rfc6939_support': 'true'}, " + "'Vlan2000': {'dhcpv6_servers': ['fc02:2000::3', 'fc02:2000::4'], 'dhcpv6_option|rfc6939_support': 'false'}}" ) ) + \ No newline at end of file diff --git a/src/sonic-config-engine/tests/test_minigraph_case.py b/src/sonic-config-engine/tests/test_minigraph_case.py index 6176e7de268e..97c88b2f3271 100644 --- a/src/sonic-config-engine/tests/test_minigraph_case.py +++ b/src/sonic-config-engine/tests/test_minigraph_case.py @@ -366,14 +366,14 @@ def test_dhcp_table(self): "fc02:2000::1", "fc02:2000::2" ], - 'dhcpv6_option|link_layer_addr': 'true' + 'dhcpv6_option|rfc6939_support': 'true' }, 'Vlan2000': { 'dhcpv6_servers': [ "fc02:2000::3", "fc02:2000::4" ], - 'dhcpv6_option|link_layer_addr': 'false' + 'dhcpv6_option|rfc6939_support': 'false' } } output = self.run_script(argument)