Skip to content

Commit

Permalink
[minigraph.py]: Change config DB keys
Browse files Browse the repository at this point in the history
Signed-off-by: Lawrence Lee <[email protected]>
  • Loading branch information
theasianpianist committed Oct 30, 2020
1 parent 64eb9d4 commit 7733c53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def parse_dpg(dpg, hname):
tunnelintfs[mg_tunnel.attrib["Type"]]["MUX_TUNNEL_{}".format(tunnel_num)] = {
"tunnel_type": mg_tunnel.attrib["Type"].upper(),
"encap_ecn_mode": mg_tunnel.attrib["EcnEncapsulationMode"],
"decap_ecn_mode": mg_tunnel.attrib["EcnDecapsulationMode"],
"ecn_mode": mg_tunnel.attrib["EcnDecapsulationMode"],
"dscp_mode": mg_tunnel.attrib["DifferentiatedServicesCodePointMode"],
"ttl_mode": mg_tunnel.attrib["TtlMode"]
}
Expand Down Expand Up @@ -1146,7 +1146,7 @@ def parse_xml(filename, platform=None, port_config_file=None, asic_name=None, hw
results['VLAN'] = vlans
results['VLAN_MEMBER'] = vlan_members

results['TUNNEL_TABLE'] = get_ipinip_tunnels(tunnel_intfs, devices, hostname)
results['TUNNEL'] = get_ipinip_tunnels(tunnel_intfs, devices, hostname)

for nghbr in list(neighbors.keys()):
# remove port not in port_config.ini
Expand Down
4 changes: 2 additions & 2 deletions src/sonic-config-engine/tests/test_minigraph_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ def test_mux_cable_parsing(self):

def test_minigraph_tunnel_table(self):
result = minigraph.parse_xml(self.sample_graph, self.port_config)
argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "TUNNEL_TABLE"'
argument = '-m "' + self.sample_graph + '" -p "' + self.port_config + '" -v "TUNNEL"'
expected_tunnel = {
"MUX_TUNNEL_0": {
"tunnel_type": "IPINIP",
"dst_ip": "26.1.1.10",
"dscp_mode": "uniform",
"encap_ecn_mode": "standard",
"decap_ecn_mode": "copy_from_outer",
"ecn_mode": "copy_from_outer",
"ttl_mode": "pipe"
}
}
Expand Down

0 comments on commit 7733c53

Please sign in to comment.