12-23-2021 03:52 PM
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:
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.