infobloxopen / terraform-provider-infoblox

Infoblox NIOS Terraform Provider
https://github.com/infobloxopen/terraform-provider-infoblox
Mozilla Public License 2.0
73 stars 81 forks source link

support grid api #191

Open fawaf opened 2 years ago

fawaf commented 2 years ago

per https://www.infoblox.com/wp-content/uploads/infoblox-deployment-infoblox-rest-api.pdf

jerlev-p commented 2 years ago

One specific use case that is needed is the ability to restart DHCP services after creating a network, range and/or fixed address.

Per community article: Restart Services Using the REST API

Search for the Grid to get the reference:

curl -k -u admin:infoblox -X GET https://192.168.1.2/wapi/v1.1/grid

The search returns a reference (_ref) for the Grid:

[        {            "_ref": "grid/b25lLmNsdXN0ZXIkMA:Infoblox"        }    ]

Restart services using the reference:

curl -k -u admin:infoblox -X POST https://192.168.1.2/wapi/v1.1/grid/b25lLmNsdXN0ZXIkMA:Infoblox?_function=restartservices -H "Content-Type:application/json" -d '{"restart_option": "RESTART_IF_NEEDED", "service_option": "ALL", "member_order": "SEQUENTIALLY", "sequential_delay": '1'}'

fawaf commented 2 years ago

depends on https://github.com/infobloxopen/infoblox-go-client/issues/162