opentelekomcloud / gophertelekomcloud

GopherTelekomCloud is an OpenTelekomCloud clouds Go SDK
Apache License 2.0
20 stars 11 forks source link

[IAM] URLs for requests #162

Closed lego963 closed 1 year ago

lego963 commented 3 years ago

Some URLs have tricks with replacing strings.Replace(url, "/v3/", "/v3.0/", 1). Correct version should be already presented in client.

Aloento commented 2 years ago

Artem Lifshits said: I've done some research and in teraform this code replacement is implemented right in the client endpoint (depending on which client you are using - in our case we need domain level client with 3.0 endpoint).

lego963 commented 2 years ago

@Aloento we have in gitlab service-catalog project, so you can add missing endpoints there and add new client function.

artem-lifshits commented 2 years ago

@lego963 @Aloento I don't see any reason to add new endpoint in service-catalog, IAM use 2 endpoints (v3.0 and v3) for different requests. Adding new entry for the same service may lead to misunderstanding and confusion.

lego963 commented 2 years ago

I don't insist on that change, it was just a proposal. You can close the issue if you think that it's overhead.

Aloento commented 2 years ago

I think we should do something in the SDK so that users don't have to think about this conversion. Because it is not excluded that someone use golang sdk directly instead of teraform.

Aloento commented 2 years ago

Currently we do something like this: https://github.com/opentelekomcloud/gophertelekomcloud/blob/5617dc1705b5dd2c7ceb6d0f27ce4dca966fff7e/openstack/client.go#L607

anton-sidelnikov commented 1 year ago

we need total rework of gophertelekomcloud/openstack/client.go because it contains not up-to-date code, users have troubles of using our sdk, we can move clients from acceptance or other way. Will create another issue for that.