Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CISCO_NXOS_SHOW_IP_COMMUNITY-LIST: Add new template to support commun…
…ity-lists (#220)
- Loading branch information
1 parent
d843772
commit ef1e73c
Showing
4 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Value Required,Filldown TYPE (Standard|Expanded) | ||
Value Required,Filldown NAME (\S+) | ||
Value Required SEQ (\d+) | ||
Value Required ACTION (permit|deny) | ||
Value List AS (\d+) | ||
Value List TAG (\d+) | ||
Value COMMUNITY (\D+) | ||
|
||
Start | ||
^${TYPE}\s+Community\s+List\s+${NAME}\s*$$ | ||
^\s+${SEQ}\s+${ACTION}\s+\"*${AS}:${TAG}\"* -> Continue | ||
^\s+\d+\s+(?:permit|deny)\s+\"*\d+:\d+\"*\s+\"*${AS}:${TAG}\"* -> Continue | ||
^\s+\d+\s+(?:permit|deny)\s+(?:\"*\d+:\d+\"*\s+){2}\"*${AS}:${TAG}\"* -> Continue | ||
^\s+\d+\s+(?:permit|deny)\s+(?:\"*\d+:\d+\"*\s+){3}\"*${AS}:${TAG}\"* -> Continue | ||
^\s+.+\"*\d+:\d+\"*\s+${COMMUNITY}\s*$$ -> Continue | ||
^\s+${SEQ}\s+${ACTION}\s+${COMMUNITY}\s*$$ -> Continue | ||
^\s+ -> Record | ||
^$$ | ||
^.*$$ -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
tests/cisco_nxos/show_ip_community-list/cisco_nxos_show_ip_community-list.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
parsed_sample: | ||
- type: "Expanded" | ||
name: "ROUTES_CL1" | ||
seq: '1' | ||
action: "permit" | ||
as: ["11111"] | ||
tag: ["10000"] | ||
community: "" | ||
- type: "Standard" | ||
name: "ROUTES_CL2" | ||
seq: '1' | ||
action: "permit" | ||
as: ["11111"] | ||
tag: ["10000"] | ||
community: "" | ||
- type: "Standard" | ||
name: "ROUTES_CL2" | ||
seq: '2' | ||
action: "permit" | ||
as: ["22222"] | ||
tag: ["10000"] | ||
community: "" | ||
- type: "Standard" | ||
name: "ROUTES_CL2" | ||
seq: '3' | ||
action: "permit" | ||
as: ["33333"] | ||
tag: ["10000"] | ||
community: "" | ||
- type: "Standard" | ||
name: "ROUTES_CL2" | ||
seq: '4' | ||
action: "permit" | ||
as: ["44444", "55555"] | ||
tag: ["10000", "10005"] | ||
community: "no-export" | ||
- type: "Standard" | ||
name: "ROUTES_CL2" | ||
seq: '5' | ||
action: "deny" | ||
as: [] | ||
tag: [] | ||
community: "internet" |
8 changes: 8 additions & 0 deletions
8
tests/cisco_nxos/show_ip_community-list/cisco_nxos_show_ip_community-list.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Expanded Community List ROUTES_CL1 | ||
1 permit "11111:10000" | ||
Standard Community List ROUTES_CL2 | ||
1 permit 11111:10000 | ||
2 permit 22222:10000 | ||
3 permit 33333:10000 | ||
4 permit 44444:10000 55555:10005 no-export | ||
5 deny internet |