UpCloudLtd / upcloud-cli

UpCloud command line client (upctl)
https://upcloudltd.github.io/upcloud-cli/
MIT License
29 stars 7 forks source link

upctl server list --show-ip-addresses -o json does not show ip addresses #283

Closed nicovs closed 8 months ago

nicovs commented 8 months ago

Environment (required):

Describe the bug Querying a server list to include the IP addresses does not work when requesting the output in JSON/YAML format. When requesting it in human readable, the IP's are shown. This is tested on MacOS (brew install upcloud-cli), Arch Linux (yay -d upcloud-cli), Ubuntu (download .deb package)

To Reproduce Steps to reproduce the behavior: 1) Working: upctl server list --show-ip-addresses=public 2) Not working:

Expected behavior JSON and YAML output format should show the IP addresses

Observed behavior It should show IP addreses ;)

Screenshots Too much private info to share ;)

nicovs commented 8 months ago

I have tested all versions from the releases: https://github.com/UpCloudLtd/upcloud-cli/releases It's not working since 3.0.0. Last version that works = 2.10.0

kangasta commented 8 months ago

Hello, thank you for the bug report! This was probably broken when we synced the machine readable outputs with our Go SDK JSON types in v3.0.0.

We will take a look if this could be added to the machine readable output as well or if there is a good alternative approach. What is your use case for this: e.g., are you using this in a script or for exporting the data?

nicovs commented 8 months ago

Tnx for the swift response! 👍

Yeah, i use upctl in Json output in a script to generate my .ssh/config. I know i can use the API, but I also use the CLI to to add/remove/update firewall rules etc etc...

kangasta commented 8 months ago

This is now available in the v3.4.0 release