Reply

Python or WAPI script to disable a Network

[ Edited ]
cmh2890
Techie
Posts: 4
1262     0

I'm looking for a automated way to disable a large number of networks that will eventually be permanently retired and ensure DHCP is no longer in use prior to deletion.

 

I have the curl commands to accomplish this, but I'm new to Python or the REST API in general and am trying to determine a script to automate this process for a given network address and mask (CIDR notation).

 

curl -k -u user:pass -X GET https://gm_ip/wapi/v1.2/record:network?network=10.10.38.0/29
 
curl -k -u user:pass -X PUT https://gm_ip/wapi/v1.0/network/_ref:10.10.38.0/29/default -d disable='TRUE'

 

Thanks!

Highlighted

Re: Python or WAPI script to disable a Network

TTiscareno Community Manager
Community Manager
Posts: 340
1262     0

You can find sample scripts at https://community.infoblox.com/t5/DNS-DHCP-IPAM/WAPI-Web-API-Sample-Code-for-NIOS/m-p/105/highlight/.... You may be able to take the examples provided there to accomplish what you are looking for here.

 

Regards,

Tony

Showing results for 
Search instead for 
Do you mean 

Recommended for You