Skip to content

Commit 1fb68b9

Browse files
netpickermailsanjayhere
authored and
imi
committed
Tests and juniper (#104)
* 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 --------- Co-authored-by: mailsanjayhere <mailsanjayhere@gmail.com>
1 parent 88052ec commit 1fb68b9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

EXAMPLES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ This rule checks the status of NTP synchronization and reports if the device is
6363
commands=dict(show_ntp_status: 'show ntp status'),
6464
)
6565
def rule_ntp_sync(commands):
66-
assert ' synchronized' in configuration
66+
assert ' synchronized' in commands.show_ntp_status, "NTP is not synchronized"
6767
```
6868
*This example executes the show ntp status command and checks if the output contains the word " synchronized." If the NTP status is not synchronized, the rule will fail, indicating that the device is not in sync with the NTP server.ecure manner.*
6969

@@ -81,4 +81,4 @@ def rule_specific_log_servers_configured(configuration):
8181
assert "logging host 1.2.3.4" in configuration, "Log server 1.2.3.4 is not configured"
8282
assert "logging host 2.3.4.5" in configuration, "Log server 2.3.4.5 is not configured"
8383
```
84-
*This rule ensures that the device configuration includes the specific log servers 1.2.3.4 and 2.3.4.5. If either line is missing, the rule will fail and report which log server is not configured.*
84+
*This rule ensures that the device configuration includes the specific log servers 1.2.3.4 and 2.3.4.5. If either line is missing, the rule will fail and report which log server is not configured.*

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
We set out to revolutionize the way you can test the quality, design, compliance and security of your networks.
55

66
Netpicker allows you to discover all your devices, back up configs and run automated health- and compliance tests, based on community supported (pytest) libraries for CIS hardening, common design validations, CVE checks and many more.
7+
8+
## Examples
9+
10+
- [Netpicker Example rules](https://github.com/netpicker/pytests-for-networking/blob/main/EXAMPLES.md)

0 commit comments

Comments
 (0)