The Now Platform® Washington DC release is live. Watch now!

Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
John  Frandsen
ServiceNow Employee
ServiceNow Employee

Introduction

This article contains a recently developed and anonymized update set containing the following:

  • A custom Script Include containing the Cisco Prime API functions to query the Cisco Prime system for Wireless Access Point(s) (WAP) and the associated WAP Controllers for these aforementioned Access Points (APs).  The programming logic includes the steps to configure the JSON payload for the IRE API call to create both the WAP Controller(s) and APs.  Also the AP's reference to its parent WAP Controller is configured as part of the programming logic.
  • New Wireless AP Controller table (u_cmdb_ci_wap_controller) is extended from the 'Network Gear' table with the added attribute: Active Access Points (u_active_access_points)
  • Added WAP Controller (u_wap_controller) reference (CI) attribute to the Wireless Access Point table
  • Outbound REST messages for the integration:
    • GET WLAN Controllers
    • GET WLAN Controller Details
    • GET Access Points
    • GET Access Point Details

Note: Use this example to possibly extend the attributes for the Wireless Access Point or WAP Controller tables. Add the associated logic in the script include to configure these additional attributes for the JSON payload prior to the IRE invocation.

Required Manual Configuration (post Update Set Installation)

Create the custom 'Discovery Source':

/*A new discovery_source value for 'CiscoPrimeAPI' is required for the IRE call 
(don't manually edit the sys_choice table)...
From System Definition -> Scripts - Background execute the below*/

var dsUtil = new global.CMDBDataSourceUtil();
dsUtil.addDataSource("CiscoPrimeAPI");

Discovery Source (sys_choice.list > match discovery_source) for the cmdb_ci Table:

find_real_file.png

Create authentication profile:

A default anonymized configuration is provided as an example.

find_real_file.png

Identify Cisco Prime End Point and MID Server

A default anonymized configuration is provided as an example.  All 'end point' records must be modified for the particular site.

find_real_file.png

Create the scheduled job:

The main function in the script include can be 'called' from a scheduled job, i.e.

find_real_file.png

new CiscoPrimeIntegration().run();
//new CiscoPrimeIntegration().getWANControllers();
//new CiscoPrimeIntegration().getWirelessAPs();

Example Screen Captures

Log File Entries:

WAP Controller Log Entries (includes IRE input JSON payload):

find_real_file.png

Wireless Access Point Log Entries (includes IRE input JSON payload):

find_real_file.png

System Web Services > Outbound > REST Message Records:

REST Message Main Record

find_real_file.png

REST Message Main Record (default all payloads from Cisco Prime to JSON)

find_real_file.png

HTTP Methods - GET WLAN Controllers

find_real_file.png

HTTP Methods - GET WLAN Controller Details

find_real_file.png

HTTP Methods - GET Access Points (with pagination)

find_real_file.png

HTTP Methods - GET Access Points (with pagination) #2

find_real_file.png

HTTP Methods - GET Access Point Details

find_real_file.png

HTTP Methods - GET Access Point Details #2

find_real_file.png

Example Cisco Prime JSON payloads:

GET WLAN Controllers Payload (0 to 29 count of EntityIds):  An EntityId is required for the WAN Controller Details method.
Note: A similar logic is also applied for a 'page' (1000 EntityIds) of Access Points (APs) whereas each AP EntityId us used to query for the AP's 'full' details.   The APs are 'paginated' at 1000 entries per 'Get Access Points' method until all AP EntityIds from the Cisco Prime AP EntityIds table are exhausted.

find_real_file.png

Resultant JSON payload to create WAP Controller CI via IRE call (script include):

find_real_file.png

Resultant JSON payload to create Wireless Access Point CI via IRE call and the relation/reference to the AP's WAP Controller (script include):

find_real_file.png

Comments
Leland Dingman
Tera Contributor

Hi

You list the version as Paris, is there anything in your integration example that is dependent on that version or could this be done on older versions of SN like Orlando or NewYork ?

 

Thanks

Leland.

John  Frandsen
ServiceNow Employee
ServiceNow Employee
The IRE API is the ‘legacy’ version & should work with previous versions. As with any code, I can only verify the ServiceNow version used during the development of the solution. Always test in a sub-prod instant before deploying to production (as I would do if I reuse this code).
Utkarsh8
Giga Explorer

Hi John,

Script Include 'IdentificationEngineScriptableApi' is neither available OOB nor in the provided Update Set. Kindly provide the XML file for the same.

Appreciate your help.

matt_a
Kilo Guru

Hi John, Thanks for this and I have got it up and running.

I have come across one small issue though. The Json im getting back has the following for IP Address and Mac Address:

"ipAddress":{"address":"<IP HERE>"},

"macAddress":{"octets":"<MAC HERE>"},

As such, the data that is added to the ci is as follows: [object Object]

So it would suggest that it is unable to read it from the array.

Have I missed something here, or maybe the Cisco API has changed since you authored this?

 

 

matt_a
Kilo Guru

Figured it out. Needed to update the script:

find_real_file.png

Cedric Creton
Tera Expert

Hi John!

 

Thanks a lot.

Question about your 2 screenshots related to log entries: is it the logs of the connection/sync or of the logfile of the Cisco Prime itself (what I'm expecting for Event Management)

 

Best regards!!


Cedric

Version history
Last update:
‎12-31-2020 12:33 PM
Updated by: