Skip to content

Commit

Permalink
Tests and juniper (#114)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
netpicker and mailsanjayhere authored Aug 26, 2024
1 parent 41dafaa commit d0f1780
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def rule_interface_status_check(device):
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.
You can create tags such as datacenter, campus, or branch, and then apply specific rules to all devices in these groups.

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

0 comments on commit d0f1780

Please sign in to comment.