Skip to content

Commit

Permalink
CiscoS300 'show system' template (#1521)
Browse files Browse the repository at this point in the history
  • Loading branch information
PavloSkliarenko authored Nov 8, 2023
1 parent caa3c8c commit 741b865
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
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 @@ -388,6 +388,7 @@ cisco_s300_show_lldp_neighbors.textfsm, .*, cisco_s300, sh[[ow]] lld[[p]] neig[[
cisco_s300_show_ip_interface.textfsm, .*, cisco_s300, sh[[ow]] ip interface
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"

0 comments on commit 741b865

Please sign in to comment.