cancel
Showing results for 
Search instead for 
Did you mean: 

Get XMC licenses via script or Rest-API

Get XMC licenses via script or Rest-API

StephanH
Valued Contributor III
Hello,

is there a way to get the current licenses via script or REST-API?

I need the info how many End-Systems for NAC are licensed to proceed in another script.
If I can get the license string it's easy do find out that value.

Or is there another place where I can find the information how many end systems for NAC are licensed?

Best regards
Stephan

Regards Stephan
1 ACCEPTED SOLUTION

StephanH
Valued Contributor III

As I have now finally learned, there is unfortunately no way to query the licenses via the API.
 

Regards Stephan

View solution in original post

16 REPLIES 16

StephanH
Valued Contributor III
One little hint.
I do not care about other licenses in the license file (maybe there are assessment licenses or anything else) with the script. Because in my case I have only NAC licenses!!!
Regards Stephan

StephanH
Valued Contributor III
Hello Suresh,

here a little Python script working for me:

Best regards
Stephan

import re import sys #open license file try: f = open('/usr/local/Extreme_Networks/NetSight/appdata/license/NacEnterprise.lic', 'r') except IOError: print "Can't open license file" sys.exit(0) #sum single licenses licenses = 0 for x in f: reg = re.search(r"IA-ES-([13]|12)K", x) lic = reg.group(1) lic = int(lic) * 1000 licenses = licenses + lic #print sum of single licenses print licenses
Regards Stephan

Bharathiraja__S
Extreme Employee
Hi Stephan,

Sure ,

Please share us the status once you able to get the info by using Python.

Thanks,
Suresh.B

StephanH
Valued Contributor III
Thank you very much Suresh,

that's what I need. I had forgotten that there is this file.

I have no python script up to now, because I needed first the info how I can get the license .
Regards Stephan

Bharathiraja__S
Extreme Employee
Hi Stephan,

Could you share your python script which will look for license file ? if you have one already.

The license file is located in below location but we have to use the pointer to locate below file.

root@xmc52.extremenetworks.com:/usr/local/Extreme_Networks/NetSight/appdata/license$ ls
NetSightEval.lic

Thanks,
Suresh.B

GTM-P2G8KFN