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

lxc storage volume <action> completion issue with snapshots #14682

Closed
simondeziel opened this issue Dec 17, 2024 · 0 comments · Fixed by #14702
Closed

lxc storage volume <action> completion issue with snapshots #14682

simondeziel opened this issue Dec 17, 2024 · 0 comments · Fixed by #14702
Assignees
Labels
Bug Confirmed to be a bug Jira Triggers the synchronization of a GitHub issue in Jira
Milestone

Comments

@simondeziel
Copy link
Member

Steps to reproduce:

$ lxc storage volume create default foo
$ lxc storage volume snapshot default foo
$ lxc storage volume show default custom/foo<tab>
custom/foo                  custom/foo/snapshots/snap0

$ lxc storage volume show default custom/foo/snapshots/snap0 
Error: Invalid snapshot name

$ lxc storage volume show default custom/foo/snap0 
name: snap0
description: ""
content_type: filesystem
created_at: 2024-12-17T22:30:17.958279135Z
expires_at: 0001-01-01T00:00:00Z
config:
  volatile.uuid: 6ea5154a-6c91-4776-ad52-dcc84c4e9211

tl;dr: there is a bogus snapshots/ part being added during completion.

@kadinsayani kadinsayani added the Bug Confirmed to be a bug label Dec 18, 2024
@kadinsayani kadinsayani added this to the lxd-6.3 milestone Dec 18, 2024
@kadinsayani kadinsayani added the Jira Triggers the synchronization of a GitHub issue in Jira label Dec 18, 2024
kadinsayani added a commit to kadinsayani/lxd that referenced this issue Dec 18, 2024
…e show`

Fixes canonical#14682.

This commit fixes shell completions for snapshots when running `lxc
storage volume show`. `GetStoragePoolVolumeNames` returns the full
volume name including "/snapshots/", which is incorrect in the context
of the CLI.

Signed-off-by: Kadin Sayani <[email protected]>
kadinsayani added a commit to kadinsayani/lxd that referenced this issue Dec 18, 2024
…e show`

Fixes canonical#14682.

This commit fixes shell completions for snapshots when running `lxc
storage volume show`. `GetStoragePoolVolumeNames` returns the full
volume name including "/snapshots/", which is incorrect in the context
of the CLI.

Signed-off-by: Kadin Sayani <[email protected]>
kadinsayani added a commit to kadinsayani/lxd that referenced this issue Dec 19, 2024
…e show`

Fixes canonical#14682.

This commit fixes shell completions for snapshots when running `lxc
storage volume show`. `GetStoragePoolVolumeNames` returns the full
volume name including "/snapshots/", which is incorrect in the context
of the CLI.

Signed-off-by: Kadin Sayani <[email protected]>
kadinsayani added a commit to kadinsayani/lxd that referenced this issue Dec 19, 2024
…e show`

Fixes canonical#14682.

This commit fixes shell completions for snapshots when running `lxc
storage volume show`. `GetStoragePoolVolumeNames` returns the full
volume name including "/snapshots/", which is incorrect in the context
of the CLI.

Signed-off-by: Kadin Sayani <[email protected]>
kadinsayani added a commit to kadinsayani/lxd that referenced this issue Dec 19, 2024
…e show`

Fixes canonical#14682.

This commit fixes shell completions for snapshots when running `lxc
storage volume show`. `GetStoragePoolVolumeNames` returns the full
volume name including "/snapshots/", which is incorrect in the context
of the CLI.

Signed-off-by: Kadin Sayani <[email protected]>
(cherry picked from commit 1bcc8b3)
tomponline added a commit that referenced this issue Dec 20, 2024
…date (#14702)

Fixes #14682.

Summary of changes:

- Fixes shell completions for `lxc storage volume show`.
`GetStoragePoolVolumeNames` returns the full volume name including
"/snapshots/", which is incorrect in the context of the CLI. To address
this issue, parsing has been added to serve valid completions for
snapshot volumes.
- Updates the command description for `lxc storage volume snapshot`.
- Fixes `cmpInstanceSetKeys` logic to provide completions for any
instance keys which are currently set, not just prefixed keys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug Jira Triggers the synchronization of a GitHub issue in Jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants