Reply
Highlighted
Accepted Solution

Trying to add a DHCP range with a Failover association instead of a DHCP member using the REST API.

davechampagne
Techie
Posts: 6
3312     0

I'm new to the REST API and I'm trying to add a DHCP range with the member set to a failover association. I've been successful at adding a range with a single member but I've been unable to find the data structure for adding a range with the failover association. The structure for adding a range with a member is this.

 

{"result": {"_ref": "range/ZG5zLmRoY3BfcmFuZ2UkMTAuMTAuMTAuMjAvMTAuMTAuMTAuMTAwLy8vMC8:10.10.10.20/10.10.10.100/default", "end_addr": "10.10.10.100", "member": {"_struct": "dhcpmember", "ipv4addr": "172.26.1.3", "ipv6addr": null, "name": "member1.localdomain" }, "network": "10.10.10.0/24", "network_view": "default", "start_addr": "10.10.10.20" }} 

 

Can anyone tell me what construct looks like for adding the range with a failover association instead of a member?

 

Thanks very much.

Re: Trying to add a DHCP range with a Failover association instead of a DHCP member using the REST A

Adviser
Posts: 93
3313     0

Adding a range and assinging a failover is a bit more simple than the member, we just need to give the name of the failover association.  For example:

 

{"start_addr": "10.99.1.100", "end_addr": "10.99.1.199","failover_association": "Dallas-Chicago"}"

 

And here's the full unix curl example to make a new range, assigned to the failover:

 

curl -k1 -u admin:infoblox -X POST 'https://10.9.16.6/wapi/v2.7/range'  -H "Content-Type: application/json" \
       -d "{\"end_addr\": \"10.99.1.199\",\"start_addr\": \"10.99.1.100\",\"failover_association\": \"Dallas-Chicago\"}"

 

 

 

Re: Trying to add a DHCP range with a Failover association instead of a DHCP member using the REST A

davechampagne
Techie
Posts: 6
3313     0

That worked perfectly. Thank you so much for your assitance.

Re: Trying to add a DHCP range with a Failover association instead of a DHCP member using the REST A

davechampagne
Techie
Posts: 6
3313     0

On a side note, if you use single quotes around the -d string you don't need to use the backslashes.

 

-d '{"end_addr": "10.99.1.199","start_addr": "10.99.1.100","failover_association": "Dallas-Chicago"}'

 

This works too. I find it just makes it easier to read and type.

Showing results for 
Search instead for 
Do you mean 

Recommended for You