Skip to content

Commit

Permalink
New Template: IOS - show license (networktocode#533)
Browse files Browse the repository at this point in the history
  • Loading branch information
FragmentedPacket authored and thomasblass committed Oct 25, 2020
1 parent 1d54d92 commit 68e39d0
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/cisco_ios_show_license.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value FEATURE (\S+)
Value PERIOD_LEFT (.*)
Value PERIOD_USED (.*)
Value LICENSE_TYPE (.*)
Value LICENSE_STATE (.*)
Value LICENSE_COUNT (.*)
Value LICENSE_PRIORITY (.*)

Start
^Index\s+\d+\s+Feature: -> Continue.Record
^Index\s+\d+\s+Feature:\s+${FEATURE}$$
^\s+Period\s+left:\s+${PERIOD_LEFT}$$
^\s+Period\s+Used:\s+${PERIOD_USED}$$
^\s+License\s+Type:\s+${LICENSE_TYPE}$$
^\s+License\s+State:\s+${LICENSE_STATE}$$
^\s+License\s+Count:\s+${LICENSE_COUNT}$$
^\s+License\s+Priority:\s+${LICENSE_PRIORITY}$$
^\s*$$
^. -> Error

1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ cisco_ios_show_snmp_user.template, .*, cisco_ios, sh[[ow]] sn[[mp]] u[[ser]]
cisco_ios_show_ip_route.template, .*, cisco_ios, sh[[ow]] ip r[[oute]]
cisco_ios_show_aliases.template, .*, cisco_ios, sh[[ow]] alia[[ses]]
cisco_ios_show_archive.template, .*, cisco_ios, sh[[ow]] arc[[hive]]
cisco_ios_show_license.template, .*, cisco_ios, sh[[ow]] lic[[ense]]
cisco_ios_show_standby.template, .*, cisco_ios, sh[[ow]] sta[[ndby]]
cisco_ios_show_version.template, .*, cisco_ios, sh[[ow]] ver[[sion]]
cisco_ios_show_ip_arp.template, .*, cisco_ios, sh[[ow]] i[[p]] a[[rp]]
Expand Down
73 changes: 73 additions & 0 deletions tests/cisco_ios/show_license/cisco_ios_show_license.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
parsed_sample:

- feature: appxk9
license_count: Non-Counted
license_priority: Medium
license_state: Active, In Use
license_type: Permanent
period_left: Life time
period_used: ''
- feature: uck9
license_count: Non-Counted
license_priority: None
license_state: Active, Not in Use, EULA not accepted
license_type: EvalRightToUse
period_left: Not Activated
period_used: 0 minute 0 second
- feature: securityk9
license_count: Non-Counted
license_priority: Medium
license_state: Active, In Use
license_type: Permanent
period_left: Life time
period_used: ''
- feature: ipbasek9
license_count: Non-Counted
license_priority: Medium
license_state: Active, In Use
license_type: Permanent
period_left: Life time
period_used: ''
- feature: FoundationSuiteK9
license_count: Non-Counted
license_priority: None
license_state: Active, Not in Use, EULA not accepted
license_type: EvalRightToUse
period_left: Not Activated
period_used: 0 minute 0 second
- feature: AdvUCSuiteK9
license_count: Non-Counted
license_priority: None
license_state: Active, Not in Use, EULA not accepted
license_type: EvalRightToUse
period_left: Not Activated
period_used: 0 minute 0 second
- feature: cme-srst
license_count: 0/0 (In-use/Violation)
license_priority: None
license_state: Active, Not in Use, EULA not accepted
license_type: EvalRightToUse
period_left: Not Activated
period_used: 0 minute 0 second
- feature: hseck9
license_count: Non-Counted
license_priority: Medium
license_state: Active, In Use
license_type: Permanent
period_left: Life time
period_used: ''
- feature: throughput
license_count: Non-Counted
license_priority: None
license_state: Active, Not in Use, EULA not accepted
license_type: EvalRightToUse
period_left: Not Activated
period_used: 0 minute 0 second
- feature: internal_service
license_count: ''
license_priority: ''
license_state: ''
license_type: ''
period_left: ''
period_used: ''
60 changes: 60 additions & 0 deletions tests/cisco_ios/show_license/cisco_ios_show_license.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Index 1 Feature: appxk9
Period left: Life time
License Type: Permanent
License State: Active, In Use
License Count: Non-Counted
License Priority: Medium
Index 2 Feature: uck9
Period left: Not Activated
Period Used: 0 minute 0 second
License Type: EvalRightToUse
License State: Active, Not in Use, EULA not accepted
License Count: Non-Counted
License Priority: None
Index 3 Feature: securityk9
Period left: Life time
License Type: Permanent
License State: Active, In Use
License Count: Non-Counted
License Priority: Medium
Index 4 Feature: ipbasek9
Period left: Life time
License Type: Permanent
License State: Active, In Use
License Count: Non-Counted
License Priority: Medium
Index 5 Feature: FoundationSuiteK9
Period left: Not Activated
Period Used: 0 minute 0 second
License Type: EvalRightToUse
License State: Active, Not in Use, EULA not accepted
License Count: Non-Counted
License Priority: None
Index 6 Feature: AdvUCSuiteK9
Period left: Not Activated
Period Used: 0 minute 0 second
License Type: EvalRightToUse
License State: Active, Not in Use, EULA not accepted
License Count: Non-Counted
License Priority: None
Index 7 Feature: cme-srst
Period left: Not Activated
Period Used: 0 minute 0 second
License Type: EvalRightToUse
License State: Active, Not in Use, EULA not accepted
License Count: 0/0 (In-use/Violation)
License Priority: None
Index 8 Feature: hseck9
Period left: Life time
License Type: Permanent
License State: Active, In Use
License Count: Non-Counted
License Priority: Medium
Index 9 Feature: throughput
Period left: Not Activated
Period Used: 0 minute 0 second
License Type: EvalRightToUse
License State: Active, Not in Use, EULA not accepted
License Count: Non-Counted
License Priority: None
Index 10 Feature: internal_service

0 comments on commit 68e39d0

Please sign in to comment.