infoblox-go-client
infoblox-go-client copied to clipboard
extra parameters when creating record using nextavailableip function
with a regular API request, I can do the following operation in order to create a new A record with the next available ip in a specific network while excluding some IPs:
endpoint:
{baseURL}/wapi/v2.13/record:a
body:
{
"comment": "record added by API request",
"ipv4addr": {
"_object_function": "next_available_ip",
"_parameters": {
"exclude": ["10.127.24.1", "10.127.24.2"],
"num": 1
},
"_result_field": "ips",
"_object": "network",
"_object_parameters": {
"network": "10.127.24.0/21"
}
},
"name": "test.example.com",
"ttl": 3600,
"use_ttl": true
}
Is there a way to do this same thing using the Go client? I know I can use the string "func:nextavailable:10.127.24.0/21" as the "ipv4addr" parameter, but this does not allow exclusions of IPs (that I know of, at least). I can't seem to find a way do this with the Go client, since it expects a *string as input.