Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 16, 2025
1 parent de48bd8 commit 239ea7d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 23 deletions.
4 changes: 1 addition & 3 deletions anta/tests/snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

from typing import TYPE_CHECKING, Any, ClassVar, Literal, get_args

from pydantic import BaseModel, model_validator

from pydantic import field_validator
from pydantic import BaseModel, field_validator, model_validator

from anta.custom_types import PositiveInteger, SnmpErrorCounter, SnmpPdu, SnmpVersion
from anta.input_models.snmp import SnmpHost, SnmpUser
Expand Down
28 changes: 9 additions & 19 deletions examples/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,14 @@ anta.tests.snmp:
# Verifies the SNMP error counters.
error_counters:
- inVersionErrs
- VerifySnmpGroup:
# Verifies the SNMP group configurations for specified version(s).
snmp_groups:
- group_name: Group1
version: v1
read_view: group_read_1
write_view: group_write_1
notify_view: group_notify_1
- VerifySnmpHostLogging:
# Verifies SNMP logging configurations.
hosts:
Expand Down Expand Up @@ -800,25 +808,7 @@ anta.tests.snmp:
group_name: test_group
version: v3
auth_type: MD5
priv_type: AES-128 - VerifySnmpGroup:
snmp_groups:
- group_name: Group1
version: v1
read_view: group_read_1
write_view: group_write_1
notify_view: group_notify_1
- group_name: Group2
version: v2c
read_view: group_read_2
write_view: group_write_2
notify_view: group_notify_2
- group_name: Group3
version: v3
authentication: v3Auth
read_view: group_read_3
write_view: group_write_3
notify_view: group_notify_3

priv_type: AES-128
anta.tests.software:
- VerifyEOSExtensions:
# Verifies that all EOS extensions installed on the device are enabled for boot persistence.
Expand Down
2 changes: 1 addition & 1 deletion tests/units/anta_tests/test_snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from anta.tests.snmp import (
VerifySnmpContact,
VerifySnmpErrorCounters,
VerifySnmpHostLogging,
VerifySnmpGroup,
VerifySnmpHostLogging,
VerifySnmpIPv4Acl,
VerifySnmpIPv6Acl,
VerifySnmpLocation,
Expand Down

0 comments on commit 239ea7d

Please sign in to comment.