Actions
Bug #11244
closedMAC taken error when updating NIC IPMI details through API
Description
Running on Foreman 1.9RC2, Ubuntu 12.04.5
I'm trying to update the BMC user+password for a host (plan to push this into the discovery image), but I can't get update to work.
First it complains that mac is required:
# curl -k -uadmin:$PW https://localhost:443/api/hosts/hostname.com -X PUT -d '{"host": {"interfaces_attributes": [{"identifier": "ipmi", "username": "root"}]}}' -H 'Content-Type: application/json' { "error": {"id":3152,"errors":{"interfaces.mac":["can't be blank"],"interfaces":["some interfaces are invalid"]},"full_messages":["Mac can't be blank","Interfaces some interfaces are invalid"]} }
Then it complains mac already exists:
# curl -k -uadmin:$PW https://localhost:443/api/hostname.com -X PUT -d '{"host": {"interfaces_attributes": [{"identifier": "ipmi", "username": "root", "mac": "34:17:eb:e5:81:ed"}]}}' -H 'Content-Type: application/json' { "error": {"id":3152,"errors":{"interfaces.mac":["has already been taken"],"interfaces":["some interfaces are invalid"]},"full_messages":["Mac has already been taken","Interfaces some interfaces are invalid"]} }
Actions