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

Improve storage volume help #973

Merged
merged 3 commits into from
Jul 9, 2024
Merged

Improve storage volume help #973

merged 3 commits into from
Jul 9, 2024

Conversation

AJRepo
Copy link
Contributor

@AJRepo AJRepo commented Jul 8, 2024

As someone who was new to incus, I had some confusion about "type" as it related to volumes. This help text update hopefully helps others who are new to incus not have that same confusion.

This update does the following:

  • Moved description text from "cmd.Example" section to cmd.Long section. Now the example sections only have examples.

  • Added additional example to --help for "incus storage volume" command to show virtual-machine example

  • added Error text for when the default (custom) is used and reports "not found". Note: this introduces an if statement which gives different error messages depending on if someone uses custom or not. If that is not ok, feel free to remove.

  • Ran make i18n (separate commit)

@AJRepo AJRepo requested a review from stgraber as a code owner July 8, 2024 02:32
Comment on lines 958 to 959
cmd.Example = cli.FormatSection("", i18n.G(
`incus storage volume edit [<remote>:]<pool> [<type>/]<volume> < volume.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Examples should be functional, so not include variables or optional entries.

So in this case we'd probably have to change it to something like:

incus storage volume edit default foo < volume.yaml
  Update the foo custom storage volume in the default pool with YAML data from volume.yaml

@stgraber
Copy link
Member

stgraber commented Jul 8, 2024

I'm taking a look at this one as there are a few more edits that are needed here I think.

AJRepo and others added 3 commits July 8, 2024 16:16
This makes a few changes:
 - Consistently say "custom storage volume" for anything that only applies to custom volumes
 - Have all relevant help messages mention that custom is the default type and list other possible types
 - Make all examples more consistent
 - Fix a number of incorrect comments

Signed-off-by: AJRepo <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
@stgraber stgraber changed the title Incus volume help Improve storage volume help Jul 8, 2024
@stgraber stgraber merged commit d57a1ec into lxc:main Jul 9, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants