Yaniv Bronhaim has submitted this change and it was merged.
Change subject: tool: Fix error message for non-existing module
......................................................................
tool: Fix error message for non-existing module
When user specify non existing module (e.g. foo)using the --module
option, he would get this confusing error:
UsageError: error: argument --module: invalid choice: foo (choose from
['foo'])
While the availabe modules are certificates, libvirt, and sanlock.
Now the error display the available modules, sorted, and formatted in a
user friendly way, instead of as Python list:
UsageError: error: argument --module: invalid choice: foo
(available: certificates, libvirt, sanlock)
The relevant test use now real names, so errors look like real errors,
which help to format them properly.
Change-Id: Ib794b4cb0dcedbbd5b5bb4bb4396860e5edd8710
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1127877
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/31742
Reviewed-by: mooli tayer <mtayer(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/32055
Reviewed-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Tested-by: mooli tayer <mtayer(a)redhat.com>
---
M lib/vdsm/tool/configurator.py
M tests/toolTests.py
2 files changed, 6 insertions(+), 4 deletions(-)
Approvals:
Nir Soffer: Looks good to me, but someone else must approve
Yaniv Bronhaim: Looks good to me, approved
mooli tayer: Verified
--
To view, visit
http://gerrit.ovirt.org/32055
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib794b4cb0dcedbbd5b5bb4bb4396860e5edd8710
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>