Skip to content

Commit

Permalink
minigraph.py: give VoQ chassis peers an admin_status of 'up'
Browse files Browse the repository at this point in the history
Previously admin_status was not populated for these peers.
  • Loading branch information
jmmikkel committed Mar 30, 2021
1 parent 620ef2d commit 705529c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sonic-config-engine/minigraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def parse_cpg(cpg, hname, local_devices=[]):
admin_status = 'up'
else:
table = bgp_sessions
admin_status = None
admin_status = 'up'

if end_router.lower() == hname.lower():
table[start_peer.lower()] = {
Expand Down
2 changes: 1 addition & 1 deletion src/sonic-config-engine/tests/test_cfggen.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def test_minigraph_bgp_voq_chassis_peer(self):
output = self.run_script(argument)
self.assertEqual(
utils.to_dict(output.strip()),
utils.to_dict("{'rrclient': 0, 'name': 'CHASSIS_PEER', 'local_addr': '10.2.0.20', 'nhopself': 0, 'holdtime': '180', 'asn': '65100', 'keepalive': '60'}")
utils.to_dict("{'rrclient': 0, 'name': 'CHASSIS_PEER', 'local_addr': '10.2.0.20', 'nhopself': 0, 'holdtime': '180', 'asn': '65100', 'keepalive': '60', 'admin_status': 'up'}")
)

# make sure VoQChassisInternal value of false is honored
Expand Down

0 comments on commit 705529c

Please sign in to comment.