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

CiscoS300 'show system' template #1521

Merged
Merged
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
21 changes: 21 additions & 0 deletions ntc_templates/templates/cisco_s300_show_system.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Value DESCRIPTION (.*)
Value UP_TIME (.*)
Value CONTACT (.*)
Value HOSTNAME (.*)
Value List LOCATION (.*)
Value MAC_ADDRESS (.*)
Value OID (.*)
Value FANS_STATUS (.*)

Start
^\s*System\s+Description:\s*${DESCRIPTION}\s*$$
^\s*System\s+Up\s+Time\s+\(days,hour:min:sec\):\s*${UP_TIME}\s*$$
^\s*System\s+Contact:\s*${CONTACT}\s*$$
^\s*System\s+Name:\s*${HOSTNAME}\s*$$
^\s*System\s+MAC\s+Address:\s*${MAC_ADDRESS}\s*$$
^\s*System\s+Object\s+ID:\s*${OID}\s*$$
^\s*Fans\s+Status:\s*${FANS_STATUS}\s*$$
^\s*System\s+Location:\s*${LOCATION}\s*$$
^\s*$$
^\s*${LOCATION}\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ cisco_s300_show_mac_address-table.textfsm, .*, cisco_s300, sh[[ow]] mac address-
cisco_s300_show_lldp_neighbors.textfsm, .*, cisco_s300, sh[[ow]] lld[[p]] neig[[hbors]]
cisco_s300_show_system_id.textfsm, .*, cisco_s300, sh[[ow]] system id
cisco_s300_show_version.textfsm, .*, cisco_s300, sh[[ow]] ver[[sion]]
cisco_s300_show_system.textfsm, .*, cisco_s300, sh[[ow]] system

cisco_wlc_ssh_show_flexconnect_group_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] fl[[exconnect]] gr[[oup]] s[[ummary]]
cisco_wlc_ssh_show_advanced_802.11a_channel.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ad[[vanced]] 802\.11[ab] ch[[annel]]
Expand Down
10 changes: 10 additions & 0 deletions tests/cisco_s300/show_system/cisco_s300_show_system.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
System Description: 24-Port 10/100 PoE Managed Switch
System Up Time (days,hour:min:sec): 70,03:16:47
System Contact: +7(495)363-06-75
System Name: ZOO-SF300-POE-2
System Location: Moscow, Zoologicheskaya street, room
11
System MAC Address: 34:bd:c8:36:2a:41
System Object ID: 1.3.6.1.4.1.9.6.1.82.24.2

Fans Status: OK
12 changes: 12 additions & 0 deletions tests/cisco_s300/show_system/cisco_s300_show_system.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- mac_address: "34:bd:c8:36:2a:41"
contact: "+7(495)363-06-75"
description: "24-Port 10/100 PoE Managed Switch"
fans_status: "OK"
hostname: "ZOO-SF300-POE-2"
location:
- "Moscow, Zoologicheskaya street, room"
- "11"
oid: "1.3.6.1.4.1.9.6.1.82.24.2"
up_time: "70,03:16:47"
Loading