Skip to content

Tests and juniper #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
71691c6
adding wireless tests
mailsanjayhere Aug 2, 2024
ced476c
renamed vendor names
mailsanjayhere Aug 2, 2024
a32f586
testing juniper file
mailsanjayhere Aug 2, 2024
b45c401
testing with rule_11.py
mailsanjayhere Aug 2, 2024
592c5de
updated the first rule
mailsanjayhere Aug 2, 2024
addcd0a
adding EXAMPLES.md
mailsanjayhere Aug 19, 2024
01883e8
updated the URL for EXAMPLES.md
mailsanjayhere Aug 19, 2024
e4473f7
Merge branch 'main' into tests_and_juniper
netpicker Aug 19, 2024
b4d1115
TOC for EXAMPLES.md
mailsanjayhere Aug 19, 2024
1bb817e
Tests and juniper (#96) (#97)
netpicker Aug 19, 2024
634ffa1
Merge branch 'tests_and_juniper' of https://github.com/netpicker/pyte…
mailsanjayhere Aug 19, 2024
cb25c11
updating TOC
mailsanjayhere Aug 19, 2024
8f545d5
Merge branch 'main' into tests_and_juniper
netpicker Aug 19, 2024
1575a16
updated for EXAMPLES.md
mailsanjayhere Aug 19, 2024
d8e6bfb
one more update
mailsanjayhere Aug 19, 2024
e0225d7
Merge branch 'main' into tests_and_juniper
netpicker Aug 19, 2024
d046490
removed example inside EXAMPLE.md
mailsanjayhere Aug 20, 2024
cc1fe9d
Squashed commit of the following:
netpicker Aug 20, 2024
eaa20b5
Merge branch 'main' into tests_and_juniper
netpicker Aug 20, 2024
33a850c
changed entire file contents
mailsanjayhere Aug 20, 2024
6a2e73a
Merge branch 'tests_and_juniper' of https://github.com/netpicker/pyte…
mailsanjayhere Aug 20, 2024
5830aeb
Merge branch 'main' into tests_and_juniper
netpicker Aug 20, 2024
e14a500
fixed typo for devices
mailsanjayhere Aug 20, 2024
a6aeaab
Merge branch 'tests_and_juniper' of https://github.com/netpicker/pyte…
mailsanjayhere Aug 20, 2024
a6b5929
Merge branch 'main' into tests_and_juniper
netpicker Aug 20, 2024
6aef930
update EXAMPLES.md README.md
mailsanjayhere Aug 20, 2024
5ff7b35
Merge branch 'tests_and_juniper' of https://github.com/netpicker/pyte…
mailsanjayhere Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ This rule checks the status of NTP synchronization and reports if the device is
commands=dict(show_ntp_status: 'show ntp status'),
)
def rule_ntp_sync(commands):
assert ' synchronized' in configuration
assert ' synchronized' in commands.show_ntp_status, "NTP is not synchronized"
```
*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.*

## Multiple Lines

### Example: Ensure Specific Log Servers are Configured
This rule checks that specific log servers are configured in the device:ists:
This rule checks that specific log servers are configured in the device:

```python
@medium(
Expand All @@ -81,4 +81,4 @@ def rule_specific_log_servers_configured(configuration):
assert "logging host 1.2.3.4" in configuration, "Log server 1.2.3.4 is not configured"
assert "logging host 2.3.4.5" in configuration, "Log server 2.3.4.5 is not configured"
```
*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.*
*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.*
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
We set out to revolutionize the way you can test the quality, design, compliance and security of your networks.

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.

## Examples

- [Netpicker Example rules](https://github.com/netpicker/pytests-for-networking/blob/main/EXAMPLES.md)
Loading