Skip to content

feat: improve CLI completion for lxc auth subcommands #15298

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

Open
1 task done
simondeziel opened this issue Mar 31, 2025 · 1 comment
Open
1 task done

feat: improve CLI completion for lxc auth subcommands #15298

simondeziel opened this issue Mar 31, 2025 · 1 comment
Assignees
Labels
Improvement Improve to current situation

Comments

@simondeziel
Copy link
Member

Please confirm

  • I have searched existing issues to check if an issue already exists for my feature request.

Is your feature request related to a problem? Please describe.

Some of the lxc auth subcommands are missing CLI completion

Describe the solution you'd like

It'd be nice if lxc auth group delete would autocomplete based on existing groups:

root@micro1:~# lxc auth group list
+-------------+-------------+
|    NAME     | DESCRIPTION |
+-------------+-------------+
| e2e-testing |             |
+-------------+-------------+
root@micro1:~# lxc auth group delete <tab>

Similarly, lxc auth group permission add should also propose completing based on existing groups.

Also, lxc auth identity group add should propose completing existing entities and groups:

root@micro1:~# lxc auth identity list
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
| AUTHENTICATION METHOD |        TYPE        |    NAME     |                            IDENTIFIER                            |   GROUPS    |
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
| tls                   | Client certificate | e2e-testing | 6c9e84dc87c5e7b6f90d43e7e5055b2121a0e28549c8a84936192e8455e27108 | e2e-testing |
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
| tls                   | Server certificate | micro1      | 9528207a660b89fa4b82e1b20d415f68019c92e513d6e3a747b707b21c37ead0 |             |
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
| tls                   | Server certificate | micro2      | a1d5ef70354a730d4fff99fe9260ebb091e810cf58e3fcecf78ed2eeb941c33b |             |
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
| tls                   | Server certificate | micro3      | 415c0ff0bb007bc4b5ddd249a956b3fa342283aeccdac2b25cf19284caab74be |             |
+-----------------------+--------------------+-------------+------------------------------------------------------------------+-------------+
root@micro1:~# lxc auth group list
+-------------+-------------+
|    NAME     | DESCRIPTION |
+-------------+-------------+
| e2e-testing |             |
+-------------+-------------+

# this is what I would have liked to tab complete to:
root@micro1:~# lxc auth identity group add tls/e2e-testing e2e-testing

Describe alternatives you've considered

No response

Additional context

No response

@simondeziel simondeziel added the Feature New feature, not a bug label Mar 31, 2025
@tomponline tomponline added Improvement Improve to current situation and removed Feature New feature, not a bug labels Apr 1, 2025
@markylaing markylaing self-assigned this Apr 1, 2025
@markylaing
Copy link
Contributor

I'm on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Improve to current situation
Projects
None yet
Development

No branches or pull requests

3 participants