Network Change & Configuration Management

Reply
Accepted Solution

Anyone have an Example NetMRI REST call using filters in Python?

Guru
Posts: 61
3385     0

Greetings all,

 

I'm working on a Python script that gets the subnets discovered by NetMRI, and then grabs the discovered Vlan information.  Eventually, this data will be fed into DDI extensible attributes, also using Python and REST.

 

Using /subnets/find and /subnets/index, i am able to get all subnets, but I want to be more targetted.

If i want to get just subnets that fall within 172.16.0.0/12, is a filter the best way, or is there another method to get just those subnets?

 

 

thanks for your time.

Daniel

Re: Anyone have an Example NetMRI REST call using filters in Python?

Adviser
Posts: 357
3386     0

Using find will perform better than an XML filter. I created an example for you in the netmri-toolkit github:

 

https://github.com/infobloxopen/netmri-toolkit/blob/master/python/subnets-in-cidr.py

 

This uses the infoblox-netmri python module.

 

Re: Anyone have an Example NetMRI REST call using filters in Python?

Guru
Posts: 61
3386     0

Awesome!  Thanks John!

Showing results for 
Search instead for 
Do you mean 

Recommended for You