Skip to content

Commit

Permalink
[bgp_templates] update show commands used (#905)
Browse files Browse the repository at this point in the history
Signed-off-by: NilashishC <[email protected]>
  • Loading branch information
NilashishC authored Nov 5, 2024
1 parent bc69035 commit b55b518
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_ana_569.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- "[bgp_templates] - fix the show commands used to ensure task does not fail if BGP is not enabled on the device."
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def get_config(self, connection):
"""Wrapper method for `connection.get()`
This method exists solely to allow the unit test framework to mock device connection calls.
"""
as_number = connection.get("show running-config bgp | include 'router bgp'")
templates = connection.get("show running-config bgp | section 'template'")
as_number = connection.get("show running-config | include 'router bgp'")
templates = connection.get("show running-config | section 'template'")

return as_number + "\n" + templates

Expand Down

0 comments on commit b55b518

Please sign in to comment.