Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Unable to manage domains migrated to Gandi-V5 #279

Open
srgvg opened this issue Jan 15, 2019 · 7 comments
Open

Unable to manage domains migrated to Gandi-V5 #279

srgvg opened this issue Jan 15, 2019 · 7 comments

Comments

@srgvg
Copy link

srgvg commented Jan 15, 2019

The v4 gandi domain list still produces the list of my domains, however when I want to look at a domain, gandi record list xyz.abc I get No zone records found, domain xyz.abc doesn't seems to be managed at Gandi.

I looked at the code, and the problem is with what happens in the backend of gandi dns domain.list - the corresponding API backend call returns an empty list.

curl -H "X-Api-Key: $APIKEY" https://dns.api.gandi.net/api/v5/domains 
[]

The same check is performed when editing/creating/listing records, and as the domain is not found, it fails with the former error.

If there is a solution within the gandi.cli client, I'd love to see it implemented. I might have a shot at it myself perhaps.

Can the right way to go forward with this issue be confirmed? Is it something to be solved with the backend API, or the client?

srgvg added a commit to srgvg/gandi.cli that referenced this issue Mar 5, 2019
see Gandi#279

add a sharing_id to dns requests
sharing id should be saved in the config yaml
 ~/.config/gandi/config.yaml
as apirest.sharing_id subkey
@srgvg
Copy link
Author

srgvg commented Mar 5, 2019

I wrote a small patch that works around this issue, for me, ee 3b7a62a
It involves looking up the "sharing_id" of the organisation that 'owns' the domains you want to work on, and adding it in the config file. The sharing id should be saved in ~/.config/gandi/config.yaml as apirest.sharing_id subkey

I won't make a PR of this, as I expect this to just be a temp workaround.
AFAICS, we'd need an api to retrieve the different origanization id's available to the user, but that doesn't seem to exist, yet?

@grigouze
Copy link

grigouze commented Mar 6, 2019

Hello @srgvg , yes this API doesn't exists now, but will be available in near future.

@tristanbes
Copy link

tristanbes commented May 14, 2019

Hello,

The API now exist, doc: https://api.gandi.net/docs/domains.
How soon can we have an update to gandi.cli ? I'm eager to order new domain names via the cli. #288

Thanks.

@enys
Copy link

enys commented Apr 2, 2020

Looks like the problem is still present, any idea on a timeline for a fix ?

@srgvg
Copy link
Author

srgvg commented May 8, 2020

I found a new workaround, that also solves #291:
I implemented it here: srgvg@15004e3

Strangely, it seems gandi.cli is using a different API than what is described at https://api.gandi.net/docs/domains - it uses https://dns.api.gandi.net/api/v5

User valere|G told me on the IRC channel, that this is an old API

there will be no future developments on this API
it has been merged into our new REST api endpoint

So it seems gandi.cli needs quite some work to be updated to the real new api, as it for now uses the old one for everything related to dns.

@wassafr
Copy link

wassafr commented Oct 23, 2020

@srgvg Thanks for your fix it's working

Did you by any chance create a PR so that Gandi can merge your fix?

This bug has been going around for two years now and I'm very disappointed Gandi was not able to fix it themselves...

@srgvg
Copy link
Author

srgvg commented Oct 23, 2020

@wassafr no PR, this fix is a bit hacky, where it uses the newer API, and I don't expect this to be acceptable.

AFAIK, the whole client should be rewritten to use the newest API.
Perhaps @grigouze could confirm this?

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

No branches or pull requests

5 participants