Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 885635 - wrong auto completion of option: option that appears in help and after pressing tab differers from option that actually auto completed
Summary: wrong auto completion of option: option that appears in help and after pressi...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Michael Pasternak
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-10 09:45 UTC by Ilia Meerovich
Modified: 2016-02-10 19:24 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-12 07:44:19 UTC
oVirt Team: Infra
Target Upstream Version:


Attachments (Terms of Use)

Description Ilia Meerovich 2012-12-10 09:45:09 UTC
Wrong auto completion:

group, cluster, datacenter, host, storagedomain, template, user, vmpool  options auto completes to --<option>-identifier instead of --<option>

Please take a look:

[RHEVM shell (connected)]# add permission --group-identifier
[RHEVM shell (connected)]# add permission
cluster        datacenter     group          host           storagedomain  template       user           vm             vmpool        
[RHEVM shell (connected)]# add permission --group-identifier

error: option --group-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --datacenter-identifier


error: option --datacenter-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --cluster-identifier


error: option --cluster-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --host-identifier


error: option --host-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --storagedomain-identifier


error: option --storagedomain-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --template-identifier


error: option --template-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --user-identifier


error: option --user-identifier cannot be empty.


[RHEVM shell (connected)]# add permission --vm


error: cannot create "permission" because permissions collection is not available or given arguments not valid.,
possible arguments combinations are [['host'], ['template'], ['storagedomain'], ['group'], ['user'], ['vmpool'], ['datacenter'], ['cluster'], ['vm']].


[RHEVM shell (connected)]# add permission --vmpool-identifier


error: option --vmpool-identifier cannot be empty.


[RHEVM shell (connected)]#

Comment 1 Michael Pasternak 2012-12-10 11:24:03 UTC
(In reply to comment #0)
> Wrong auto completion:
> 
> group, cluster, datacenter, host, storagedomain, template, user, vmpool 
> options auto completes to --<option>-identifier instead of --<option>

you're wrong, there is no such thing as --<option>, as --<option> represents resource which you should be identifiable, this is the same across the app.,

i.e permission/s are added to resource and resource identified as --<resource>-identifier, 

help shows:
==========

     Overload 3:
     
     * --role-id: string
     * --host-id: string

cli auto-completes to
=====================

add permission --host-identifier --role-id


you getting an error on empty identifier:
========================================

[RHEVM shell (connected)]# add permission --host-identifier

error: option --host-identifier cannot be empty.

(also you're not specifying --role-id)

to summarise:
============

you can argue that from --host-id in help is not clear that it should be
resolved to the --host-identifier, but this is what for auto-completion 
is exist (also form user pov 'id' is synonym of 'identifier').

Comment 2 Michael Pasternak 2012-12-12 07:44:19 UTC
there is a technical restriction for parent objects to be identified in different manner (--<resource>-identifier).


Note You need to log in before you can comment on or make changes to this bug.