dnaeon / pyinfoblox

Infoblox WAPI module for Python
16 stars 11 forks source link

Fonction record_host.update missing #15

Closed gotzilla closed 4 years ago

gotzilla commented 4 years ago

Hi, perhaps I don't find the correct way to do it but it's like this function is missing.

Is there a way to add

infoblox.record_host.update()

To your project,

Thanks by advance for your time

dnaeon commented 4 years ago

It's right there. Just call that up with the proper payload and you should be fine.

The library will dispatch the API call to the appropriate API endpoint.

gotzilla commented 4 years ago

Got it @dnaeon ! Thank you.

So I feed the record_host.update with the "ref key" and it try to change the host as I want but the 'host' field is not writable and this is what I want to do in fact, is there a way to do it ?

pyinfoblox.InfobloxWAPIException: b'{ "Error": "AdmConProtoError: Field is not writable: host", \n  "code": "Client.Ibap.Proto", \n  "text": "Field is not writable: host"\n}'

I'm pretty new in github, should I open a new issue ?

gotzilla commented 4 years ago

Ok I finally found the problem, it is not the fields "host" that have to be change but the field "name" at the higher level.

We have to pass the object ref :

objref='record:host/{id}

Which has the field 'name' that can be modified

rather than the object ref :

record:host_ipv4addr/{id}

Which has the field 'host' that can't be modified.

Thanks for your help