- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
WAPI: Reset fields to inherited status
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 07:06 AM
Hi Forum,
I am trying to delete PXE-Boot options (next-server/bootfile) from an existing fixed address by REST-PUT. Does anyone know how to reset these fields, so they go back to the "inherited" (from network) state?
{"bootfile": "" "empty" or "null"} will be accepted literally
{"bootfile": 0, empty or null } are "Bad Requests".
Thanks for any hint
Solved! Go to Solution.
Re: WAPI: Reset fields to inherited status
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 07:39 PM
You will also need to use the "use_" field for each attribute. Here's how to clear out all three PXE options.
Before setting, getting the pertenant fields for a specific fixed address:
curl -k1 -u admin:infoblox -X GET 'https://192.168.1.6/wapi/v2.11/fixedaddress?ipv4addr=192.168.1.201&_return_fields%2b=bootfile,bootserver,nextserver,use_bootfile,use_bootserver,use_nextserver'
returns:
[ { "_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuOS4xNi4yMDEuMC4u:192.168.1.201/default", "bootfile": "boot.bin", "bootserver": "10.10.10.10", "ipv4addr": "192.168.1.201", "network_view": "default", "nextserver": "10.10.10.10", "use_bootfile": true, "use_bootserver": true, "use_nextserver": true } ]
Then set each value using the _ref for the fixed address:
curl -k1 -u admin:infoblox -X PUT 'https://192.168.1.6/wapi/v2.11/fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuOS4xNi4yMDEuMC4u:192.168.1.201/default' \ -H "Content-Type: application/json" -d \ '{ "bootfile": "", "bootserver": "", "nextserver": "", "use_bootfile": false, "use_bootserver": false, "use_nextserver": false }'
Review the fields again, after setting:
curl -k1 -u admin:infoblox -X GET 'https://192.168.1.6/wapi/v2.11/fixedaddress?ipv4addr=192.168.1.201&_return_fields%2b=bootfile,bootserver,nextserver,use_bootfile,use_bootserver,use_nextserver'
returns:
[ { "_ref": "fixedaddress/ZG5zLmZpeGVkX2FkZHJlc3MkMTAuOS4xNi4yMDEuMC4u:192.168.1.201/default", "ipv4addr": "192.168.1.201", "network_view": "default", "use_bootfile": false, "use_bootserver": false, "use_nextserver": false } ]
Re: WAPI: Reset fields to inherited status
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2022 11:48 PM
Thank you, this works.