THE GAME HAS CHANGED

Introducing Infoblox Universal DDI ManagementTM

Watch the launch to discover the new era of management for critical network services. Watch Now

API & Integration, DevOps,NetOps,SecOps

Reply

infoblox-client exceptions or errors?

New Member
Posts: 1
1164     0

I am very new to working with Python and APIs in general. I am trying to automate the creation of new host records in Infoblox by getting the next availble IP from a specified subnet. I came across the infoblox-client libarary and it looked promising.

 

I am able to create host records in my script using a combination of the following:

 

objects.IPAllocation.next_available_ip_from_cidr
objects.IP.create
objects.HostRecord.create

 

Unfortunately when there are no more availble IPs in the subnet that the user specifies, my script fails. I am trying to capture the exception or error that is returned by the Infoblox server, so I can show the text of why it failed in that case.

 

I am having hard time understanding how to use the exception classes. Does anyone have an example they can share with a novice?

 

Thanks all. The forum is a great resource. Hopefully I can contribute in the future.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You