Input Types
anta.custom_types ¶
Module that provides predefined types for AntaTest.Input instances
Afi
module-attribute
¶
Afi = Literal['ipv4', 'ipv6', 'vpn-ipv4', 'vpn-ipv6', 'evpn', 'rt-membership']
Interface
module-attribute
¶
Interface = Annotated[str, Field(pattern='^(Dps|Ethernet|Fabric|Loopback|Management|Port-Channel|Tunnel|Vlan|Vxlan)[0-9]+(\\/[0-9]+)*(\\.[0-9]+)?$'), BeforeValidator(interface_autocomplete), BeforeValidator(interface_case_sensitivity)]
TestStatus
module-attribute
¶
TestStatus = Literal['unset', 'success', 'failure', 'error', 'skipped']
aaa_group_prefix ¶
aaa_group_prefix(v: str) -> str
Prefix the AAA method with ‘group’ if it is known
Source code in anta/custom_types.py
15 16 17 18 |
|
interface_autocomplete ¶
interface_autocomplete(v: str) -> str
Allow the user to only provide the beginning of an interface name.
Supported alias
et
,eth
will be changed toEthernet
po
will be changed toPort-Channel
Source code in anta/custom_types.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
interface_case_sensitivity ¶
interface_case_sensitivity(v: str) -> str
Reformat interface name to match expected case sensitivity.
Examples:
- ethernet -> Ethernet
- vlan -> Vlan
Source code in anta/custom_types.py
39 40 41 42 43 44 45 46 47 48 |
|