Skip to content

Commit

Permalink
New Template: cisco_nxos_show_vdc.textfsm (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
FragmentedPacket authored Feb 4, 2020
1 parent 96fec68 commit ad20dbc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions templates/cisco_nxos_show_vdc.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Value VDC_ID (\d+)
Value VDC_NAME (\S+)
Value STATE (\S+)
Value MAC (\S+)
Value TYPE (\S+)
Value LC (\S+)

Start
^[Ss]witchwide\s+mode
^vdc_id\s+vdc_name\s+state\s+mac\s+type\s+lc\s*$$
^-+
^\s*${VDC_ID}\s+${VDC_NAME}\s+${STATE}\s+${MAC}\s+${TYPE}\s+${LC} -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ cisco_nxos_show_module.textfsm, .*, cisco_nxos, sh[[ow]] mod[[ule]]
cisco_nxos_show_clock.textfsm, .*, cisco_nxos, sh[[ow]] clo[[ck]]
cisco_nxos_show_vlan.textfsm, .*, cisco_nxos, sh[[ow]] vl[[an]]
cisco_nxos_show_fex.textfsm, .*, cisco_nxos, sh[[ow]] fex
cisco_nxos_show_vdc.textfsm, .*, cisco_nxos, sh[[ow]] vdc
cisco_nxos_show_vpc.textfsm, .*, cisco_nxos, sh[[ow]] vpc
cisco_nxos_show_vrf.textfsm, .*, cisco_nxos, sh[[ow]] vrf

Expand Down
8 changes: 8 additions & 0 deletions tests/cisco_nxos/show_vdc/cisco_nxos_show_vdc.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

Switchwide mode is m1 f1 m1xl f2 m2xl f2e f3

vdc_id vdc_name state mac type lc
------ -------- ----- ---------- --------- ------
1 not1.barr1 active e4:c7:22:0c:67:c1 Admin None
2 foo1.bar1.bazz1 active e4:c7:22:0c:67:c2 Ethernet f2e
3 foo2.bar2.bazz2 active e4:c7:22:0c:67:c3 Ethernet f2e
20 changes: 20 additions & 0 deletions tests/cisco_nxos/show_vdc/cisco_nxos_show_vdc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
parsed_sample:
- vdc_id: "1"
vdc_name: "not1.barr1"
state: "active"
mac: "e4:c7:22:0c:67:c1"
type: "Admin"
lc: "None"
- vdc_id: "2"
vdc_name: "foo1.bar1.bazz1"
state: "active"
mac: "e4:c7:22:0c:67:c2"
type: "Ethernet"
lc: "f2e"
- vdc_id: "3"
vdc_name: "foo2.bar2.bazz2"
state: "active"
mac: "e4:c7:22:0c:67:c3"
type: "Ethernet"
lc: "f2e"

0 comments on commit ad20dbc

Please sign in to comment.