Skip to content

Commit 26cbb75

Browse files
netpickermailsanjayhere
authored and
imi
committed
Tests and juniper (#108)
* adding wireless tests * renamed vendor names * testing juniper file * testing with rule_11.py * updated the first rule * adding EXAMPLES.md * updated the URL for EXAMPLES.md * TOC for EXAMPLES.md * Tests and juniper (#96) (#97) * adding wireless tests * renamed vendor names * testing juniper file * testing with rule_11.py * updated the first rule * adding EXAMPLES.md * updated the URL for EXAMPLES.md --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com> * updating TOC * updated for EXAMPLES.md * removed example inside EXAMPLE.md * Squashed commit of the following: commit 8d3fe28 Author: Netpicker <156186606+netpicker@users.noreply.github.com> Date: Mon Aug 19 09:26:59 2024 +0200 Tests and juniper (#100) * adding wireless tests * renamed vendor names * testing juniper file * testing with rule_11.py * updated the first rule * adding EXAMPLES.md * updated the URL for EXAMPLES.md * TOC for EXAMPLES.md * Tests and juniper (#96) (#97) * adding wireless tests * renamed vendor names * testing juniper file * testing with rule_11.py * updated the first rule * adding EXAMPLES.md * updated the URL for EXAMPLES.md --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com> * updating TOC * updated for EXAMPLES.md --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com> * changed entire file contents * fixed typo for devices * update EXAMPLES.md README.md * removed few items from TOC * replaced : with = in commands check * added 2nd example for multiple lines check * updated example 2 --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
1 parent 7d92219 commit 26cbb75

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ This rule checks the status of BGP neighbors and reports if any neighbor is down
8686
@medium(
8787
name='rule_bgp_neighbors_up',
8888
platform=['cisco_ios'],
89-
commands={'show_bgp_summary': 'show ip bgp summary'},
89+
commands=dict('show_bgp_summary'='show ip bgp summary'),
9090
)
91-
def rule_bgp_neighbors_up(configuration, commands, device, devices):
91+
def rule_bgp_neighbors_up(commands):
9292
bgp_output = commands.show_bgp_summary
9393
neighbors_down = [line for line in bgp_output.splitlines() if 'Idle' in line or 'Active' in line or 'Connect' in line]
9494
assert len(neighbors_down) == 0, f"BGP neighbors down: {', '.join([line.split()[0] for line in neighbors_down])}"

0 commit comments

Comments
 (0)