This lightweight tool automatically generates authorization files for Cisco devices within the scope of Specific License Reservation (SLR). It requires a list of devices to be registered together with the corresponding reservation request codes and license entitlement tags.
Prior to installing and running the program, the following requirements should be met:
- A valid CCO/Cisco.com account
- Python 3.X
- Internet conection to Cisco Software Central
Copy the repository to your local machine and follow the steps described in the following.
In order to use the tool, it is necessary to get access to the Smart Licensing API. The API calls inside the code are authenticated by a client ID
and the corresponding client secret
. To register and get the client ID and secret, make sure you have a valid CCO/Cisco.com account and click on Mulesoft - Cisco API Server
The link has instructions to register a new application:
* Use an arbitrary application name
* Select 'Resource Owner Grant' and 'Client Credentials Grant' type from the options for OAuth grant type.
A confirmation will appear upon successful application registration. Also, an email notification will be sent as confirmation to the email id(s) mentioned while submitting the request. Please note down the Client Id & Secret. These will be used to generate the OAuth 2.0 Bearer token to access APIs.
Important - The Client Id & Secret generated will be ready to use immediately under normal circumstances. If you get an 401 while making the API call, please allow another 30 mins while the Client Id propagates to all the availability zones. If you have any questions or concerns please reach out to operations team at smart-operations@cisco.com
Open the terminal and type in:
$ pip3 install -r requirements.txt
The config.json
file is the central configuration file for the tool. It should be edited for API authentication and authorization purposes:
client_id
: Smart licensing API client IDclient_secret
: Smart licensing API client secretusername
: Cisco.com usernamepassword
: Cisco.com passwordsmartAccountDomain
: Smart account domain namevirtualAccountName
: Name of the virtual account within the smart account domain
In order to run the app, you need to define the devices to be registered. The devices are listed in the hosts.json
file which is used as an input for the tool.
Relace the variable names inside the default hosts.json
file with the right values for your devices.
After editing the host file, run the app by typing:
$ python3 main.py