Ravi Nori has uploaded a new change for review. Change subject: cli: 'list' command does not work as expected ......................................................................
cli: 'list' command does not work as expected List command with extra arguments does not show error example: list clusters xyz Change-Id: Ie63b9ecad913dc25dd4acbc6a3bc7174651f87c4 Bug-Url: https://bugzilla.redhat.com/947482 Signed-off-by: Ravi Nori <rn...@redhat.com> --- M src/ovirtcli/command/list.py 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-cli refs/changes/09/14009/1 diff --git a/src/ovirtcli/command/list.py b/src/ovirtcli/command/list.py index c8dcd46..c6b5ea4 100644 --- a/src/ovirtcli/command/list.py +++ b/src/ovirtcli/command/list.py @@ -19,6 +19,7 @@ from ovirtcli.utils.typehelper import TypeHelper # from ovirtsdk.infrastructure import brokers from ovirtcli.command.show import ShowCommand +from cli.messages import Messages class ListCommand(OvirtCommand): @@ -145,8 +146,11 @@ """Execute "list".""" args = self.arguments opts = self.options - typs = self.get_plural_types(method='list', typ=args[0]) + + if len(args) > 1: + self.error(Messages.Error.INVALID_ARGUMENT_SEGMENT % str(args[1:])) + self.context.formatter.format(self.context, self.get_collection(typ=args[0], opts=opts, -- To view, visit http://gerrit.ovirt.org/14009 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie63b9ecad913dc25dd4acbc6a3bc7174651f87c4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-cli Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches