Closed mkurios closed 6 years ago
Just trying to understand the problem. Should the last command be --domain-name bla-a
instead of --domain-name bla
?
Ok, so entry-name
and entry-type
are used to determine which record to update which is why it's not working for you. I suppose the option you suggested could be added but I think it's better for you to just write a custom python script for your needs; the transip_cli
is only intended for testing and basic operations.
You can look at the update_dns
method in the cli to see how to make the required calls in python.
https://github.com/benkonrath/transip-api/blob/master/transip/transip_cli.py#L33
Hi Ben,
Yes, I made a typo censoring the domain/name values… thought I wouldn’t mail that after I saw it, which I should have… I’m unfamiliar with sending in bug reports, sorry about that. Goes to show, only send in actually tested lines….
Hmm.. Is there anyway I should be doing this better ? I know transip has their PHP library but I found that a bit convoluted while your library worked just fine. Is there no way of incorporating fixes like this in your sources, I feel this should be a bugfix that should be in there, especially as currently it seems to delete DNS entries as well. I’m not a PHP programmer and certainly not up to all the unit testing your git requires, but I would like this included. Any way I can help with this ?
Transapi_cli for me is going to be scripted as a SPF record auto updating script, and I have a feeling more people might be interested. I’ve resorted to now just mailing differences and doing stuff manually which is open to human failure, not something you want in SPF or DNS records…sigh..
And I completely ignored your second remark, sorry for that.
I’ll have a look at update_dns as you advised, and I’ll get back on that.
I do know some PHP, if I can get any useful updates to the code I’ll upload that.
It not being one of my usual languages I don’t know how useful that code would be :(
Ok, I think it make sense to just fix this this project. I'm a bit busy right now so it might take a couple of weeks for me to get to it. You could also try to fix the bug if you're up for it.
There is only one endpoint for managing DNS entries: Transip_DomainService::setDnsEntries. Its behavior is documented as following: 'Sets the DnEntries for this Domain, will replace all existing dns entries with the new entries'. So it is not possible to update a single DNS entry since they do not have an unique identifier.
@foarsitter Thanks for looking into this. I think it's clear that this issue can't be addressed with the transip api. I'm closing this bug.
I'd like to update a single DNS entry (@), while we also have other entries with that name (but different content). In my tests an update does not work as it updates (and deletes!?) other records.
Is there any way of specifying exactly which records to update ? an '--entry-current-content' or such ?
Reproducing:
Testing was done with Ubuntu 16.04.3, Python 2.7.11-1 and TransIP-API 0.3.0.
I add 3 TXT records to my DNS of 3600 expire and named 'testing', but with incremented IP as content. After this I ran an update command to another IP. (name & domain name censored)
Result Now looking on the transip DNS page, it shows only two entries left, .1 and .2 If i make 4 entries (.0 .1 .2 .3), and update to .4, i have three entries left .1 .3 .4