cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2350
Views
10
Helpful
4
Replies

Looking AXL API to get Prime License Manager information.

montkevin
Level 1
Level 1

Hi All,

Is there an API that i can use to get from from Cisco Prime License Manager?

I see that  the below is possible. As ELM/Prime does not have any supported APIs itself - it may not be possible to programmatically retrieve all licensing details.

Has there been any recent developments on the same?

For 11.0, 'listLicensedUser' was added for searching/bulk info of users, along with 'doUpdateLicenseUsage', which (I think) causes CUCM to sync license info with ELM/Prime for updated data.  Note the operations-by-release page does not seem to reflect these two APIs currently (will fix.)

See this page for obtaining the AXL WSDL from the CUCM server:

https://developer.cisco.com/site/axl/learn/how-to/get-wsdl.gsp

getLicensedUser request/response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">

  <soapenv:Header/>

  <soapenv:Body>

      <ns:getLicensedUser>

        <name>dstaudt</name>

      </ns:getLicensedUser>

  </soapenv:Body>

</soapenv:Envelope>

---------------------------

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

  <soapenv:Body>

      <ns:getLicensedUserResponse xmlns:ns="http://www.cisco.com/AXL/API/10.5">

        <return>

            <licensedUser uuid="{1F1D3AFF-F77D-319B-7693-3C2221E6AF78}">

              <userId>dstaudt</userId>

              <firstName>David</firstName>

              <lastName>Staudt</lastName>

              <snrEnabled>f</snrEnabled>

              <emEnabled>f</emEnabled>

              <deviceCount>2</deviceCount>

              <licenseType>HCS_Standard</licenseType>

              <licenseUsed>1</licenseUsed>

            </licensedUser>

        </return>

      </ns:getLicensedUserResponse>

  </soapenv:Body>

</soapenv:Envelope>

-Kevin Monteiro

4 Replies 4

montkevin
Level 1
Level 1

Hi All,

Is there an API that i can use to get information from Cisco Prime License Manager?


-Kevin Monteiro

Hello Kevin,

I recently had to do something similar to what you are asking. The answer to your question is a little bit of a grey area. From an monitoring perspective, there isn't much to work with when it comes to ELM/PLM, however there are some things that you can use to get some relevant info. I recently had to do a similar request involving getting license info from CUCM itself. For my case, I used the executeSQLQuery API method to gather information.

There are a couple of main tables that you can use, and although they don't give you a 100% clear view of what you would see in ELM/PLM, they might be useful to you:

  • licenseserver - This table will provide the following items:
    • elmname - hostname/IP of the ELM server
    • tklicensingmode - a key that links tot the typelicensingmode table
    • tklicensingstate - a key that links to the typelicensingstate table
    • elmlastcontactts - unix timestamp for the last contact time between CUCM and ELM/PLM
    • graceleftdays - number of days remaining in your grace period

If you join the table above, a mix of licenseserver.graceleftdays and typelicensingstate.name will let you know if your CUCM cluster is in good standing or has an issue and how long you have to fix it.

Now, you might be wondering about performing a threshold on number of licenses in use vs number of licenses available via ELM/PLM. As it currently stands, I have not been able to find a method of discovering the number of licenses available via ELM/PLM, so creating a ceiling will have to be manually defined. The other side of the coin, number of licenses in use, can be done a couple of ways. You can use the API methods that you have already discussed in your post, or create a very large and extensive SQL query to figure it out, but there is always a simpler solution. Hidden away in the informix stored procedures, there is a procedure which does a calculation of licenses. The stored procedure can be used via executeSQLQuery and looks like the following:

SELECT name,value FROM TABLE (FUNCTION LicenseTotals()) (pkid,name,value,UserValue,DeviceValue)

I hope this information helps solve your problem!

Thanks!


Do you think doUpdateLicenseUsage, needs to be called before running that manual query is needed or is that only for getLicensedUsers?

 

It depends on how accurate you want the results. If I remember correctly, PLM synchronizes once a day, which is generally acceptable for most people.