stored: list all devices if device is invalid/missing#2122
stored: list all devices if device is invalid/missing#2122BareosBot merged 7 commits intobareos:masterfrom
Conversation
d245ca5 to
22ccff4
Compare
22ccff4 to
47a6453
Compare
sebsura
left a comment
There was a problem hiding this comment.
The linked issue also asked for this list to be printed if no device name was given. I think to do this you need to remove the required clause from device_names and handle the .size() == 0 case explicitly.
47a6453 to
da6b5ce
Compare
I don't know if this is worth it, because removing the required clause from device_names creates confusion in the manual where it is stated that specifying devices is optional where it actually isn't. The same applies if one wants to have an option (e.g. --available-devices) to output the valid devices where we basically have to remove 'required' from every parameter of the command line tool. |
|
I think its definitely worth it. If you dont remember that you need to enter a device name, then you will probably also not remember that you need to put in a nonsense name to get the actual list of candidate devices. This feature makes the most sense when it gets executed when you forget to input the device name imo. |
4f7de54 to
ee39a82
Compare
e7d9cc7 to
76e359d
Compare
Fixes bareos#2051: bareos commandline tools should show available devicenames if a device is required and was not correctly specified Note that this applies for the storage utilities bscan, bextract, bls and bcopy.
This test also checks whether all available devices are printed if none is specified.
Fixes #2051: bareos commandline tools should show available
devicenames if a device is required and was not correctly specified
Note that this applies for all storage utilities.
Thank you for contributing to the Bareos Project!
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Required backport PRs have been createdSource code quality
Tests