-
Notifications
You must be signed in to change notification settings - Fork 11
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
listrecords with host=@ does not work #10
Comments
Looks like something with the API has changed - adding a record such as Will assign a couple of labels to this issue, and try to find some time to address it. Also added Thanks for the bug report! |
I did a bit of digging and here are my findings:
I think, the bug is in this statement:
My recommendation is change line 368 to:
That way, next time, around the script recognizes @ as well. A clean way might be to not map @ to ''. The API seems to accept a missing host - despite the docu specifies required. However these modifications need to be made in the modify_record routine when parsing the return of the list_record command which is executed inside of modify_record. Warning: I did NOT test any other side effects of my suggestions. On top, I recommend to pipe the print_debug statements to stderr. That way all debug messages will be printed on the console and are not i.e. piped in to variables. This makes it easier to debug. Hope this helps. |
This is great information, thank you @Cugar15. I am extremely busy with my day job and other matters, but if you'd like to raise a PR to address this, I'd be very happy to review. Even just a PR to direct Cheers |
Hi,
I'm having trouble with API.
MOD_ID=
cloudns_api.sh -sj listrecords $ZONE host=@ type=A showid=true | jq --raw-output '.id'
echo 'ID :' ${MOD_ID}
cloudns_api.sh -s modify
This works, but also adds '@' for the host.
cloudns_api.sh -sj listrecords $ZONE host=@ type=A showid=true
does not return a record??
Any help which can be provided?
Thanks!
The text was updated successfully, but these errors were encountered: