ansible.utils/tests/integration/targets/utils_validate/files/criteria/rules.yaml

21 lines
924 B
YAML

---
- name: Interface description should not be more than 8 chars
example: "Matches description this-is-a-long-description"
rule: 'description\s(.{9,})'
action: warn
- name: Ethernet interface names should be in format Ethernet[Slot/chassis number].[sub-intf number (optional)]
example: "Matches interface Eth1/1, interface eth 1/1, interface Ethernet 1/1, interface ethernet 1/1.100"
rule: 'interface\s[eE](?!\w{7}\d/\d(.\d+)?)'
action: fail
- name: Loopback interface names should be in format loopback[Virtual Interface Number]
example: "Matches interface Lo10, interface loopback 10"
rule: 'interface\s[lL](?!\w{7}\d)'
action: fail
- name: Port Channel names should be in format port-channel[Port Channel number].[sub-intf number (optional)]
example: "Matches interface Port-channel 10, interface po10, interface Port-channel 10.1"
rule: 'interface\s[pP](?!\w{3}-\w{7}\d(.\d+)?)'
action: fail