ionos-cloud / ionosctl

The IONOS Cloud CLI (ionosctl) gives the ability to manage IONOS Cloud infrastructure directly from Command Line.
Apache License 2.0
30 stars 6 forks source link

Cannot list location UUID #226

Closed wmendes-ionos closed 1 year ago

wmendes-ionos commented 1 year ago

Description

When using ionosctl, I cannot find the location uuid, even that the rest api documentation shows it in the responses. https://api.ionos.com/docs/cloud/v6/#tag/Locations/operation/locationsGet

I also cannot get details of a location

Expected behavior

I can find, filter, and see the location uuid when ionosctl location list I can see details of a specific location.

Environment

Go Version:

go version go1.19.4 darwin/arm64

Ionosctl version:

IONOS Cloud CLI version: DEV -
SDK GO version: 6.1.3
SDK GO DBaaS Postgres version: 1.0.4
SDK GO Auth version: 1.0.5

OS:

darwin/arm64

Shell:

zsh

Configuration Files

How to Reproduce

ionosctl location list

Error and Debug Output

Listing shows me LocationId as country/city format.

me@~$ ionosctl location list
LocationId   Name        CpuFamily
de/fra       frankfurt   [INTEL_SKYLAKE]
us/las       lasvegas    [AMD_OPTERON INTEL_XEON]

Getting one gives me an error

me@~$ io location get  --location-id "de/fra"
Error: invalid argument "de/fra" for "-i, --location-id" flag: de/fra does not match UUID-4 format

Additional Notes

References

avirtopeanu-ionos commented 1 year ago

Regarding the Invalid Argument error for GET --location-id, I can't reproduce on v6.4.3:

$ ionosctl location get --location-id de/fra
LocationId   Name        CpuFamily
de/fra       frankfurt   [INTEL_SKYLAKE]
$ ionosctl version
IONOS Cloud CLI version: v6.4.3
SDK GO version: 6.1.3
SDK GO DBaaS Postgres version: 1.0.4
SDK GO Auth version: 1.0.5

As for the location details, these are already supported: ionosctl location list --cols LocationId,Name,Features,ImageAliases,CpuFamily. You can see what columns you can select in the help text:

      --cols strings     Set of columns to be printed on output 
                         Available columns: [LocationId Name Features ImageAliases CpuFamily] (default [LocationId,Name,CpuFamily])

Thanks for opening this issue, and happy new year's!

wmendes-ionos commented 1 year ago

Hi @avirtopeanu-ionos you couldn't reproduce because the version you used is different the one I did. I was with the dev one, you had the 6.4.3.

Regarding the locationID, I was expecting to have a UUID for that, but I learned that the cloud API actually treat these ids as the location name. de/fra, de/txl, etc.

all clear so far. thanks for checking !