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']
ErrDisableReasons
module-attribute
¶
ErrDisableReasons = Literal['acl', 'arp-inspection', 'bpduguard', 'dot1x-session-replace', 'hitless-reload-down', 'lacp-rate-limit', 'link-flap', 'no-internal-vlan', 'portchannelguard', 'portsec', 'tapagg', 'uplink-failure-detection']
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)]
MultiProtocolCaps
module-attribute
¶
MultiProtocolCaps = Annotated[str, BeforeValidator(bgp_multiprotocol_capabilities_abbreviations)]
TestStatus
module-attribute
¶
TestStatus = Literal['unset', 'success', 'failure', 'error', 'skipped']
VxlanSrcIntf
module-attribute
¶
VxlanSrcIntf = Annotated[str, Field(pattern='^(Loopback)([0-9]|[1-9][0-9]{1,2}|[1-7][0-9]{3}|8[01][0-9]{2}|819[01])$'), BeforeValidator(interface_autocomplete), BeforeValidator(interface_case_sensitivity)]
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 |
|
bgp_multiprotocol_capabilities_abbreviations ¶
bgp_multiprotocol_capabilities_abbreviations(value: str) -> str
Abbreviations for different BGP multiprotocol capabilities. Examples: - IPv4 Unicast - L2vpnEVPN - ipv4 MPLS Labels - ipv4Mplsvpn
Source code in anta/custom_types.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|
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
lo
will be changed toLoopback
Source code in anta/custom_types.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
interface_case_sensitivity ¶
interface_case_sensitivity(v: str) -> str
Reformat interface name to match expected case sensitivity.
Examples:
- ethernet -> Ethernet
- vlan -> Vlan
- loopback -> Loopback
Source code in anta/custom_types.py
43 44 45 46 47 48 49 50 51 52 53 |
|