07-26-2022 08:25 PM
Hi,
I'm looking to monitor the NSO license status via an API call.
I would like to retrieve the same information we currently get from the "show license status" command.
We have tried the following API call, but it returns the smart-license configuration, rather than the operational state.
curl --location-trusted -sk -u "user:pass" -H "Content-Type: application/json" -X GET https://10.1.1.1:8080/restconf/data/tailf-ncs:smart-license
We would like to see the following data ...
nso01#show license status
Smart Licensing is ENABLED
Registration:
Status: REGISTERED
Smart Account: Private
Virtual Account: Private
Export-Controlled Functionality: Allowed
Initial Registration: SUCCEEDED on Jul 27 10:19:41 2022 AEST
Last Renewal Attempt: SUCCEEDED on Jul 27 10:19:41 2022 AEST
Next Renewal Attempt: Jan 23 11:19:41 2023 AEDT
Registration Expires: Jul 27 10:14:41 2023 AEST
License Authorization:
Status: AUTHORIZED on Jul 27 10:19:48 2022 AEST
Last Communication Attempt: SUCCEEDED on Jul 27 10:19:48 2022 AEST
Next Communication Attempt: Aug 26 10:19:48 2022 AEST
Communication Deadline: Oct 25 11:14:48 2022 AEDT
Thanks
Solved! Go to Solution.
07-27-2022 02:01 AM - edited 07-27-2022 02:03 AM
If you look at the tailf-ncs-smart-license.yang file, you will see there is an action defined to show Smart Licensing state. The RESTCONF call to trigger the action should be something like the following:
curl --location-trusted -sk -u "user:pass" -X POST https://10.1.1.1:8080/restconf/operations/tailf-ncs:smart-license/show
07-27-2022 02:01 AM - edited 07-27-2022 02:03 AM
If you look at the tailf-ncs-smart-license.yang file, you will see there is an action defined to show Smart Licensing state. The RESTCONF call to trigger the action should be something like the following:
curl --location-trusted -sk -u "user:pass" -X POST https://10.1.1.1:8080/restconf/operations/tailf-ncs:smart-license/show
07-27-2022 03:22 PM
Thank you, this API call returned the information we needed.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide