diff --git a/.gitignore b/.gitignore index ede28f140f..497b3b114a 100644 --- a/.gitignore +++ b/.gitignore @@ -183,3 +183,7 @@ hosts *.py~ create_ntc-templates_parsed.py + +# Ignore pipenv files +**Pipfile +**Pipfile.lock \ No newline at end of file diff --git a/templates/cisco_nxos_show_vrf_interface.textfsm b/templates/cisco_nxos_show_vrf_interface.textfsm new file mode 100644 index 0000000000..80275b756b --- /dev/null +++ b/templates/cisco_nxos_show_vrf_interface.textfsm @@ -0,0 +1,12 @@ +Value INTERFACE (\S+) +Value NAME (\S+) +Value ID (\S+) +Value ORIGIN (\S+) + +Start + ^Interface\s+VRF-Name\s+VRF-ID\s+Site-of-Origin -> Start_record + +Start_record + ^${INTERFACE}\s+${NAME}\s+${ID}\s+${ORIGIN} -> Record + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index b9f70a71c9..714e7f1444 100644 --- a/templates/index +++ b/templates/index @@ -233,6 +233,7 @@ cisco_nxos_show_lldp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[g cisco_nxos_show_cdp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] cd[[p]] neig[[hbors]] cisco_nxos_show_ip_arp_detail.textfsm, .*, cisco_nxos, sh[[ow]] i[[p]] a[[rp]] det[[ail]] cisco_nxos_show_processes_cpu.textfsm, .*, cisco_nxos, sh[[ow]] proc[[esses]] c[[pu]] +cisco_nxos_show_vrf_interface.textfsm, .*, cisco_nxos, sh[[ow]] vrf int[[erface]] cisco_nxos_show_access-lists.textfsm, .*, cisco_nxos, sh[[ow]] acc[[ess-lists]] cisco_nxos_show_environments.textfsm, .*, cisco_nxos, sh[[ow]] envi[[ronments]] cisco_nxos_show_interface.textfsm, .*, cisco_nxos, sh[[ow]] inte[[rface]] diff --git a/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.raw b/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.raw new file mode 100644 index 0000000000..ec39380f93 --- /dev/null +++ b/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.raw @@ -0,0 +1,19 @@ +Interface VRF-Name VRF-ID Site-of-Origin +Vlan6001 ADMIN 6 -- +Vlan6700 ADMIN 6 -- +Vlan5302 AXNET 7 -- +Vlan7202 AXNET 7 -- +Vlan6302 AXNET 7 -- +Vlan5301 MARKING 4 -- +Vlan7201 MARKING 4 -- +Vlan6301 MARKING 4 -- +Ethernet1/10 Keepalive 3 -- +Vlan1 default 1 -- +Vlan100 default 1 -- +loopback0 default 1 -- +loopback1 default 1 -- +Ethernet1/25 default 1 -- +Ethernet1/30 default 1 -- +Ethernet1/17 default 1 -- +Ethernet1/42 default 1 -- +mgmt0 management 2 -- diff --git a/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.yml b/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.yml new file mode 100644 index 0000000000..c9d63f50c2 --- /dev/null +++ b/tests/cisco_nxos/show_vrf_interface/cisco_nxos_show_vrf_interface.yml @@ -0,0 +1,74 @@ +--- +parsed_sample: + - interface: "Vlan6001" + name: "ADMIN" + id: "6" + origin: "--" + - interface: "Vlan6700" + name: "ADMIN" + id: "6" + origin: "--" + - interface: "Vlan5302" + name: "AXNET" + id: "7" + origin: "--" + - interface: "Vlan7202" + name: "AXNET" + id: "7" + origin: "--" + - interface: "Vlan6302" + name: "AXNET" + id: "7" + origin: "--" + - interface: "Vlan5301" + name: "MARKING" + id: "4" + origin: "--" + - interface: "Vlan7201" + name: "MARKING" + id: "4" + origin: "--" + - interface: "Vlan6301" + name: "MARKING" + id: "4" + origin: "--" + - interface: "Ethernet1/10" + name: "Keepalive" + id: "3" + origin: "--" + - interface: "Vlan1" + name: "default" + id: "1" + origin: "--" + - interface: "Vlan100" + name: "default" + id: "1" + origin: "--" + - interface: "loopback0" + name: "default" + id: "1" + origin: "--" + - interface: "loopback1" + name: "default" + id: "1" + origin: "--" + - interface: "Ethernet1/25" + name: "default" + id: "1" + origin: "--" + - interface: "Ethernet1/30" + name: "default" + id: "1" + origin: "--" + - interface: "Ethernet1/17" + name: "default" + id: "1" + origin: "--" + - interface: "Ethernet1/42" + name: "default" + id: "1" + origin: "--" + - interface: "mgmt0" + name: "management" + id: "2" + origin: "--"