Skip to content
New issue

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

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

Already on GitHub? # to your account

Create cisco_ios_show_license_status.textfsm #1184

Closed
wants to merge 296 commits into from

Conversation

travisjohnsonga
Copy link

Create file for basics of show license status for smart licensing

ISSUE TYPE
  • New Template Pull Request
COMPONENT

cisco_ios_show_license_status

SUMMARY

New template for command. When using smart licensing, this will ease the check to see if the device is registered, and the status of registration

Smart Licensing is ENABLED

Utility:
  Status: DISABLED

Data Privacy:
  Sending Hostname: yes
    Callhome hostname privacy: DISABLED
    Smart Licensing hostname privacy: DISABLED
  Version privacy: DISABLED

Transport:
  Type: Callhome

Registration:
  Status: REGISTERED
  Smart Account: My Company Name
  Virtual Account: actname
  Export-Controlled Functionality: ALLOWED
  Initial Registration: SUCCEEDED on Aug 22 18:58:03 2022 UTC
  Last Renewal Attempt: None
  Next Renewal Attempt: Feb 18 18:58:03 2023 UTC
  Registration Expires: Aug 22 18:52:49 2023 UTC

License Authorization: 
  Status: OUT OF COMPLIANCE on Aug 22 18:58:17 2022 UTC
  Last Communication Attempt: SUCCEEDED on Aug 22 18:58:17 2022 UTC
  Next Communication Attempt: Aug 23 06:58:17 2022 UTC
  Communication Deadline: Nov 20 18:53:16 2022 UTC

Export Authorization Key:
  Features Authorized:
    <none>

ancoleman and others added 30 commits May 19, 2020 14:47
paloalto_panos_debug_swm_status.textfsm new template
…adv-routes (networktocode#709)

* Fixed template to work for cisco ios show ip bgp neighbors x.x.x.x advertised-routes

* Adjusted template to proper naming schema, adjusted test directory to match naming scheme, added regex to have ip address as optional for tests to pass
- Added few more comments
- Adjusted INDEX file to make sure templates are only used when applicable
- Templates are no longer compatible with 'show ip cef 1.1.1.1', or
	'show ip cef Vlan100'. Usage of 'detail' keyword is mandatory, such as
	'show ip cef 1.1.1.1 detail'
Co-authored-by: Mikhail Yohman <mikhail.yohman@gmail.com>
…rktocode#699)

* Added support for Cisco IOS traceroute command

This template can parse 'numeric' and 'non-numeric'
versions of the output, including extra details, such
as MPLS Exp bits, ASNs and MPLS labels (if available)

Supports up to 10 probes per hop
Captures RTT, or fault reason per probe/per hop

Excessive probes per hop (11th and above) are ignored

* Re-run tests against raw files

* Update templates/cisco_ios_traceroute.textfsm

Co-authored-by: Mikhail Yohman <mikhail.yohman@gmail.com>

Co-authored-by: Mikhail Yohman <mikhail.yohman@gmail.com>
This template produces output similar to cisco_ios_show_ip_cef.textfsm

Additional flags are no longer supported (not parsed)
Type is no longer supported, this is captured as nexthop
Nexthop's value is literally identical to what you get from
show ip cef (brief list)

Template still mandates the use of 'detail' keyword
(due to index file restrictions)
dainok and others added 6 commits August 7, 2022 08:42
…ocode#1177)

Add Cisco NX-OS "show ip dhcp snooping statistics" template
* Added new template and tests for EIGRP Interfaces Detail
Arista updates:

* Update `show ip bgp summary` to support description column
* Update `show ip ospf neighbor` to support instance column
* Update `show vrf` to support line card interfaces, subinterfaces and an alternate header
* Add support for `show ip ospf interface brief`
* Add support for `show pim ipv4 interface`
* Add support for `show pim ipv4 neighbor`
* Add support for `show ip ospf summary`
* Added new template and tests.

* Created cisco_ios_show_snmp_group.textfsm template.

Co-authored-by: Nicholas Nelson - 10105570 <nicholas.nelson@fiserv.com>
Create file for basics of show license status for smart licensing
@jvanderaa
Copy link
Contributor

It's been a while. I can get these updates in, but need some example output.

@jvanderaa
Copy link
Contributor

@travisjohnsonga would you happen to have an output that we can add in to help build tests.

@ryanmerolle
Copy link
Contributor

What is required to push this through. I'd be happy to help

@jmcgill298
Copy link
Contributor

@travisjohnsonga @ryanmerolle as requested, we need a test case to merge. Additionally, the template does not follow standards of ending each State with a catchall . -> Error

@jmcgill298 jmcgill298 added changes_requested Waiting on user to address feedback and removed question patryk-review labels Jul 16, 2024
@mjbear
Copy link
Contributor

mjbear commented Jul 27, 2024

Since this is from August 2022, there's going to be big time rebasing and merge conflict resolution required.
I think I heard @ryanmerolle say he can take the merge pain though (just kidding). 😆

@travisjohnsonga would you happen to have an output that we can add in to help build tests.

@jvanderaa
The code block at the top (with SL enabled) seems right when I compare it to output I have for a device with Smart Licensing disabled (based on Company and Virtual Account both being a string of <none>). The disabled output is probably still worth putting in the test cases, but it's not nearly as important as the enabled Smart Licensing output! 😀

What is required to push this through. I'd be happy to help

@ryanmerolle
❓ Might you have access to a Cisco IOS device that has Smart Licensing enabled?

🔥 Ah, ha! I found some example output for 8300 and 4000 platforms (thank you Cisco docs), woohoo!
➡️ Though it can't hurt to get actual live output from a device with Smart Licensing enabled.

@mjbear
Copy link
Contributor

mjbear commented Jul 27, 2024

Since this is from August 2022, there's going to be big time rebasing and merge conflict resolution required. I think I heard @ryanmerolle say he can take the merge pain though (just kidding). 😆

The merge conflicts are horrible.
(ex: the index moved along with so many other template changes)

This PR doesn't even have test data nor was the index updated to reference the new template so it doesn't seem worth saving the commit history for the gauntlet of merge conflicts.

Unless Travis responds back, updates his master branch to latest, and create a feature branch (which others of us can pull commits from to add our test data) ...
then I'm going to spin up a new branch where I can mention @travisjohnsonga's PR/fork to provide credit.

@mjbear
Copy link
Contributor

mjbear commented Jul 27, 2024

💡 I have a template worked up, but will need more test data.

Travis' output (in this thread) and output from a device with Smart Licensing disabled have some syntax/section differences. Raw output from a device running a newer IOS/IOS-XE version would be highly encouraged.

If @ryanmerolle wants to collaborate I'll push my branch to my GH fork so he can pull and work with the template.

@ChristopherJHart
Copy link
Contributor

Below is sample output from a real device (ISR4451-X, IOS-XE 17.12.4) with Smart Licensing Using Policy configured and registered.

Router#show license status  
Utility:
  Status: DISABLED

Smart Licensing Using Policy:
  Status: ENABLED

Account Information:
  Smart Account: Sample Smart Account As of Aug 03 09:03:25 2024 est
  Virtual Account: DEFAULT

Data Privacy:
  Sending Hostname: yes
    Callhome hostname privacy: DISABLED
    Smart Licensing hostname privacy: DISABLED
  Version privacy: DISABLED

Transport:
  Type: Smart
  URL: https://smartreceiver.cisco.com/licservice/license
  Proxy:
    Address: proxy.foo.bar.com
    Port: 80
    Username: <empty>
    Password: <empty>
  VRF: <empty>

Policy:
  Policy in use: Merged from multiple sources.
  Reporting ACK required: yes (CISCO default)
  Unenforced/Non-Export Perpetual Attributes:
    First report requirement (days): 365 (CISCO default)
    Reporting frequency (days): 0 (CISCO default)
    Report on change (days): 90 (CISCO default)
  Unenforced/Non-Export Subscription Attributes:
    First report requirement (days): 90 (CISCO default)
    Reporting frequency (days): 90 (CISCO default)
    Report on change (days): 90 (CISCO default)
  Enforced (Perpetual/Subscription) License Attributes:
    First report requirement (days): 0 (CISCO default)
    Reporting frequency (days): 0 (CISCO default)
    Report on change (days): 0 (CISCO default)
  Export (Perpetual/Subscription) License Attributes:
    First report requirement (days): 0 (CISCO default)
    Reporting frequency (days): 0 (CISCO default)
    Report on change (days): 0 (CISCO default)

Miscellaneous:
  Custom Id: <empty>

Usage Reporting:
  Last ACK received: Aug 03 09:03:25 2024 est
  Next ACK deadline: Aug 03 09:03:25 2025 est
  Reporting push interval: 0 (no reporting)
  Next ACK push check: Aug 03 09:05:29 2024 est
  Next report push: <none>
  Last report push: Aug 03 09:03:26 2024 est
  Last report file write: <none>

Trust Code Installed: Aug 03 09:02:50 2024 est
 
Device Telemetry Report Summary:
================================
Data Channel: AVAILABLE
Reports on disk: 0 

@mjbear
Copy link
Contributor

mjbear commented Aug 3, 2024

Below is sample output from a real device (ISR4451-X, IOS-XE 17.12.4) with Smart Licensing Using Policy configured and registered.

Thank you @ChristopherJHart!

You might not have an opinion, but I'll ask ...
Is there anything else that might be useful to add to the output (see below)?

---
parsed_sample:
  - sl_enabled: "ENABLED"
    sl_license_auth: ""
    sl_proxy_address: "proxy.foo.bar.com"
    sl_proxy_password: "<empty>"
    sl_proxy_port: "80"
    sl_proxy_username: "<empty>"
    sl_reg_status: ""
    sl_smart_acct: "Sample Smart Account"
    sl_transport: "Smart"
    sl_url: "https://smartreceiver.cisco.com/licservice/license"
    sl_virt_acct: "DEFAULT"
    sl_vrf: "<empty>"

@ChristopherJHart
Copy link
Contributor

@mjbear In my opinion, the fields under the Usage Reporting: section could be useful to capture as well. I can see a use case where somebody writes automation validating recent connectivity between a device and CSSM, and in that use case, the Usage Reporting statistics would be very helpful.

@mjbear
Copy link
Contributor

mjbear commented Aug 3, 2024

I submitted PR #1803

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
changes_requested Waiting on user to address feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.