Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TXT Record - New object ref is not returned #113

Open
gfenn-newbury opened this issue Feb 10, 2021 · 0 comments
Open

Update TXT Record - New object ref is not returned #113

gfenn-newbury opened this issue Feb 10, 2021 · 0 comments
Labels

Comments

@gfenn-newbury
Copy link
Contributor

_, err = objMgr.connector.UpdateObject(&res[0], res[0].Ref)
if err != nil || res == nil || len(res) == 0 {
return nil, err
}
return &res[0], nil

When updating an Infoblox TXT record, the new ref is not returned, as the value is discarded when calling connector.UpdateObject (see above), and the old value (&res[0]) is the one returned. This causes a 404 at the next time the TXT record needs a getbyid run on it, as the actual ref/ID is now different.

See the below for an example where the update works (in this case, updating the host record), and returns the ref of the new object:

ref, err := objMgr.connector.UpdateObject(updateHostRecord, hostRref)
return ref, err

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants