Reply

manage devices via REST API instead of SSH

Expert
Posts: 42
2676     0

Hello,

 

SSH is the "old" but still a solid way to manage infrastructure devices. What we see nowadays is more and more REST API based managing.

 

With NetMRI 7.2.1, python scripting support was introduced.

 

Has anyone ever tried to write a python script within NetMRI and called a REST Endpoint of a device to pull or push information?

 

Thanks

 

 

Re: manage devices via REST API instead of SSH

skuchynski
Techie
Posts: 14
2677     0

Indeed, REST API is being used to manage some types of devices. NetMRI has already taken first step in the direction of supporting such devices - since 7.2.1 support of data collection from devices in Cisco ACI fabric is done using REST API.

 

Pushing changes natively (like in Port Control) in not supported at the moment, but the you still can use the advantage of device REST API and NetMRI job engine to do such changes right away. Besides direct calls to device (or controller) API, there are a number of libraries to manipulate API using some language (python mostly, so enabling python support is another step to support such devices) to interact with devices like Cisco ACI, Meraki, Viptela, etc. They can be installed as Job Management library or as a package on your sandbox to give you necessary level of control.

 

Here are some examples:
https://developer.cisco.com/media/apicDcPythonAPI_v0.1/getting-started.html
https://github.com/meraki/provisioning-lib
https://github.com/bobthebutcher/viptela

Re: manage devices via REST API instead of SSH

DBrown_1
Techie
Posts: 3
2677     0

Pushing out changes using REST API and the scheduler seems fairly straightforward, but how can you leverage the device's API for discovery?

 

I can make API calls to Meraki devices to gather neighbor, route and vlan information, but I haven't found a way to insert that data into NetMRI.  My current NetMRI discovery is successfully using SNMP, but the data is limited.

 

My goal is to pull the information using the device API, and then insert it into the NetMRI database so that the device can be managed "natively" as if it were discovered by NetMRI.

 

I am primarily interested in having an accurate Topology for these devices, and the Meraki device SNMP doesn't provide vlan and route information (or CDP/LLDP peers, as far as I can see).

 

Am I going about this the wrong way?  It seems like the functionality I want is more like a Device Bundle that uses REST calls instead of SNMP.

 

Re: manage devices via REST API instead of SSH

Adviser
Posts: 406
2677     0

For storing data you can use the following link to store data into Running Config

https://blogs.infoblox.com/community/netmri-customized-configuration-collection/ 

 

Also, you can store some data in Custom Fields 

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Showing results for 
Search instead for 
Do you mean 

Recommended for You