Skip to content

Commit d0f1780

Browse files
Tests and juniper (#114)
* 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 * add 4th example * added textfsm example * updated hyperlink for toc 4 * added one more example.. using tags * typo --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
1 parent 41dafaa commit d0f1780

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
@@ -147,7 +147,7 @@ def rule_interface_status_check(device):
147147
In this example, the device_tags parameter is set to campus, meaning the rule is intended to apply only to devices tagged as part of the campus group.
148148
You can create tags such as datacenter, campus, or branch, and then apply specific rules to all devices in these groups.
149149

150-
'''python
150+
```python
151151
@medium(
152152
name='rule_one',
153153
platform=['cisco_ios'], # Specify the platform as usual
@@ -158,5 +158,5 @@ def rule_one(devices, device):
158158
for dev in devices:
159159
if 'campus' in dev.tags:
160160
print(f"Device: {dev.name} and IP address: {dev.ipaddress}")
161-
'''
161+
```
162162
*This example demonstrates how to print the name and IP address of all devices tagged with campus.*

0 commit comments

Comments
 (0)