Saturday, December 3, 2022
HomeCloud ComputingUtilizing APIs to create a Multidomain Stock for Asset Administration

Utilizing APIs to create a Multidomain Stock for Asset Administration

IT Organizations must handle, safe, and get audited on their IT belongings. The span of domains cowl a number of totally different product units with totally different working techniques by nature, and the groups are tasked to create a cohesive asset administration framework. An instance is a monetary establishment which is topic to the FFIEC steering, which requires them to have the ability to conform to an audit construction that requires managing their belongings and software program.

A second instance is the NIST publication 1800-5 on IT Asset administration that describes a framework for managing belongings in a corporation. Numerous organizations might undertake NIST as their safety framework.

Inside these frameworks, the NIST and FFIEC steering don’t name out “Cisco Gear” or “Microsoft software program”, “Digital machines”, or “Firewalls” in a vacuum. IT Directors and safety groups aren’t tasked with stock and patch administration of simply their load balancers, servers, switches, or routers.

IT Directors and their management are tasked with understanding, patching, and securing all of their IT infrastructure. From the bodily to the digital, from the endpoint to the cloud. Thus any single software wants to have the ability to match right into a framework to have the ability to merge collectively totally different techniques in a cohesive method that’s able to managing a number of working techniques and vendor implementations.

The aim of this weblog is to indicate how this may be finished virtually utilizing numerous Cisco {hardware} and software program, and the framework would bolt in to another third occasion and supply useful, simple to make use of code, that may create a single asset administration desk for merchandise within the Cisco portfolio.

We do that by integrating ACI, A number of DNAC, Meraki, Intersight, and SD-Wan platforms right into a single desk which could be cross referenced after which pushed, into Service Now. We do that utilizing accessible DevNet sandboxes as of 11/2022. There may be additionally a reference on how this may be reconciled and pushed into Service Now (in order that the system of document could be up to date following software program modifications, or reconciled).

That is useful code, which is straightforward to run towards actual sandbox environments, and could be validated and repurposed in your surroundings.

Whereas we can not management third occasion merchandise and the way they combine, the framework would permit for different gear which assist Relaxation API to create a state desk for stock asset administration. The framework is reasonably simple: seize the stock from numerous techniques utilizing REST API, and normalize to a constant checklist of all belongings in these techniques. From there, you may replace Service Now or one other system of document.

The issue we are attempting to unravel is additional elaborated in NIST 1800-5, of the a number of frameworks a buyer could also be required to audit in direction of, and the truth that its not so simple as simply operating a single vendor’s report, when your chargeable for a whole ecosystem of distributors and merchandise.

So lets get to it!

What’s created is a Google Colab pocket book, which lets you take and validate the code. That is doable as a result of we’re utilizing cloud sandboxes hosted in DevNet and our cloud platforms. In case you have by no means used Colab earlier than, it’s a Jupyter pocket book within the sky that’s as simple to run as clicking a button. It additionally permits me to simply share with you, so you may see for your self the way it works.

You will get a learn solely copy of the code right here: We are going to stroll by it under.

The very first thing you need to do, is take a look at what it says on the prime. What’s shared is a learn solely copy, and to play with it, you need your personal editable copy. So that you need to reserve it, by going to File/Save a duplicate to drive.

The following factor to take a look at is there are sections, at a excessive stage, its damaged down into

  1. Getting Meraki stock
  2. Getting SD-Wan stock
  3. Getting DNAC (and multi controller instance… this multi controller is also ACI domains, or Meraki networks)
  4. Getting Intersight stock
  5. Getting ACI Stock
  6. Merging all of them togther
  7. Elective: Updating ServiceNow instance. (observe, this makes use of a developer occasion which will probably be inactive by the point you learn this, it’s useful, get your personal developer occasion and use the URI at

Every of those sections could be ran as a gaggle, by mousing over “7 cells hidden”, or you may broaden every part and take a look at code, and what it’s doing. You’ll be able to click on the run button under, OR broaden the part. This exhibits the Meraki stock.

We then go and get the information from SD-Wan, and Intersight, we go into all of the teams and seize info and retailer them in tables, we’ve got created the under tables :

  • sdwan_inventory_df -> Knowledge Body with particulars from SDWAN
  • meraki_inventory_df -> Knowledge Body with particulars from Meraki
  • dnac_inventory_df -> Knowledge Body with particulars from DNAC
  • intersight_inventory_df -> Knowledge Body with particulars from Intersight
  • aci_inventory_df -> Knowledge Body with particulars from ACI

Every of those information frames embrace particulars from stock, and we need to simplify it for the concise desk. We scale back the quantity of fields in every desk, and rename them so they’re constant. For instance, natively ACI calls hostnames in mannequin format, as fabricNode.attributes.identify. Intersight calls Hostname “HostName”. We simply simplify this.

Cut back the Intersight desk to only a few columns,


Rename these columns to a constant format:

intersight_inventory_simple_df.rename(columns={‘SerialNumber’:’Serial’,’HostName’:’Hostname’,’ModelNumber’:’Mannequin’,’Ip.Ip’:’IP Deal with’,’Model’:’Model’}, inplace=True)

After concatenating all these tables, we’ve got a list checklist with an inventory which we are able to use to audit or replace our system of document.


Making a framework in which you’ll be able to bolt in and implement numerous techniques is prime to the roles IT wants to have the ability to present given the span of their remit. Cisco gives easy API frameworks for all of our product units, from gadget primarily based to controller primarily based, from compute to switching, DC to campus. The aim of this weblog was to offer useful code to have the ability to be evaluated simply (utilizing colab and devnet), taken, and modified as wanted. This useful code is a stepping stone to adopting automation processes in your surroundings. Please attain out if there are any questions on this!

Additional Credit score : Merging into ServiceNow

We do that in three phases, we get the prevailing stock information from service now, we examine towards our manufacturing information (principally a diff on system of document vs manufacturing), then we are able to replace our system of document.

A use case being, after upgrading SD-Wan you should have all your units on a software program model which will not be in service now. You’ll be able to replace it utilizing this logic.

As was talked about earlier, this code is not going to run when you’re reading this as my developer occasion goes inactive after 24 hours and is decommisioned after 2 weeks. You will get your personal, and also you want solely change the URI and authentication headers, to make this work. You do that at It will present you your URL to make use of, and you may both compute your authentication string utilizing python library or glean it from Postman by placing in your authentication, then changing to python code.

We create a Diff utilizing a SQL be a part of,

After which we push the Diff.




Please enter your comment!
Please enter your name here

Most Popular

Recent Comments