Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Template: Cisco NXOS show vdc #586

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions templates/cisco_nxos_show_vdc.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Value VDC_ID (\d+)
Value VDC_NAME (\S+)
Value STATE (\S+)
Value MAC (\S+)
Value TYPE (\S+)
Value LC (\S+)

Start
^\s*${VDC_ID}\s+${VDC_NAME}\s+${STATE}\s+${MAC}\s+${TYPE}\s+${LC} -> Record

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
^[Ss]witchwide\s+mode
^vdc_id\s+vdc_name\s+state\s+mac\s+type\s+lc\s*$$
^-+
^\s*$$
^. -> Error

1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,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
22 changes: 22 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,22 @@
---
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"