Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for --column to all list commands #1027

Closed
18 tasks done
stgraber opened this issue Jul 20, 2024 · 7 comments · Fixed by #1151
Closed
18 tasks done

Add support for --column to all list commands #1027

stgraber opened this issue Jul 20, 2024 · 7 comments · Fixed by #1151
Assignees
Labels
Easy Good for new contributors Feature New feature, not a bug
Milestone

Comments

@stgraber
Copy link
Member

stgraber commented Jul 20, 2024

Splitting this one out of #1026.

The full list of commands that currently do not support a --columns option are:

  • incus image alias list
  • incus cluster list-tokens
  • incus cluster group list
  • incus config template list
  • incus config trust list-tokens
  • incus image alias list
  • incus network list-leases
  • incus network list-allocations
  • incus network forward list
  • incus network integration list
  • incus network load-balancer list
  • incus network peer list
  • incus network zone list
  • incus operation list
  • incus remote list
  • incus snapshot list
  • incus storage bucket list
  • incus storage bucket key list
@stgraber stgraber added Feature New feature, not a bug Easy Good for new contributors labels Jul 20, 2024
@stgraber stgraber added this to the soon milestone Jul 20, 2024
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 9, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 9, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 9, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 9, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 9, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 9, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 10, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 10, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@HassanAlsamahi
Copy link
Contributor

I would like to continue working on this issue, can it be assigned to me? Thanks.

@stgraber
Copy link
Member Author

Done!

HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 12, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 12, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 12, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 13, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@HassanAlsamahi
Copy link
Contributor

While going through them. I noticed that the long description is not consistent across all commands.

For example:

incus storage list -h

Description:
  List available storage pools

  Default column layout: nDSdus

  == Columns ==
  The -c option takes a comma separated list of arguments that control
  which instance attributes to output when displaying in table or csv
  format.

  Column arguments are either pre-defined shorthand chars (see below),
  or (extended) config keys.

  Commas between consecutive shorthand chars are optional.

  Pre-defined column shorthand chars:
    n - Name
    D - Driver
    d - Description
    S - Source
    u - used by
    s - state

VS

incus network list -h
Description:
  List available networks

  The -c option takes a (optionally comma-separated) list of arguments
  that control which image attributes to output when displaying in table
  or csv format.

  Default column layout is: ntm46dus
  Column shorthand chars:
  4 - IPv4 address
  6 - IPv6 address
  d - Description
  e - Project name
  m - Managed status
  n - Network Interface Name
  s - State
  t - Interface type
  u - Used by (count)

Also, some of them are misleading. In network list it says "control which image attributes" instead of "control which network attributes". I fell for that myself in some of the previous PRs.

I can fix that indeed, but should I open PRs directly, or should an issue be open first for fixing the long descriptions?

stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 13, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@stgraber
Copy link
Member Author

Feel free to open PRs directly to fix those.

I suspect we did a bunch of copy/pasting over the years :)

HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 13, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@HassanAlsamahi
Copy link
Contributor

Okay. Thanks.

stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 13, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 14, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 14, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 15, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 19, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 20, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit that referenced this issue Aug 20, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
HassanAlsamahi added a commit to HassanAlsamahi/incus that referenced this issue Aug 21, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
stgraber pushed a commit to HassanAlsamahi/incus that referenced this issue Aug 22, 2024
Part of lxc#1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@HassanAlsamahi
Copy link
Contributor

Running incus config template list <instance-name> returns only one column with me:

root@incus-dev:~# incus config template list electric-snapper 
+--------------+
|   FILENAME   |
+--------------+
| hostname.tpl |
+--------------+
| hosts.tpl    |
+--------------+

Is there a case that it returns multiple columns? If not, is column selection still needed here?

@stgraber
Copy link
Member Author

@HassanAlsamahi yeah, we can skip that one.

stgraber pushed a commit that referenced this issue Aug 28, 2024
Part of #1027

Signed-off-by: HassanAlsamahi <hassanalsamahi12@gmail.com>
@stgraber stgraber modified the milestones: soon, incus-6.5 Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy Good for new contributors Feature New feature, not a bug
Development

Successfully merging a pull request may close this issue.

2 participants