Bug 1027281 - [RHEVM-SHELL]: x-identifier auto-completion doesn't work in permissions context for vm object
[RHEVM-SHELL]: x-identifier auto-completion doesn't work in permissions cont...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Ravi Nori
Ilia Meerovich
infra
:
: 1033079 (view as bug list)
Depends On:
Blocks: 3.3snap3
  Show dependency treegraph
 
Reported: 2013-11-06 08:23 EST by Michael Pasternak
Modified: 2016-02-10 14:18 EST (History)
7 users (show)

See Also:
Fixed In Version: is25
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 17:14:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 21046 None None None Never
oVirt gerrit 21142 None None None Never

  None (edit)
Description Michael Pasternak 2013-11-06 08:23:22 EST
Description of problem:

append of -identifier suffix for vm object at permission auto-completion doesn't
work for list/show/remove commands.

e.g

"list permissions vm" <TAB> produces "list permissions --vm" while should be
"list permissions --vm-identifier"
Comment 1 Ravi Nori 2013-11-06 16:43:09 EST
There are two options for "list permissions vm". vm and vmpool

Should we autocomplete to --vm-identifier or show "vm" and "vmpool" as options
Comment 2 Michael Pasternak 2013-11-07 07:48:37 EST
(In reply to Ravi Nori from comment #1)
> There are two options for "list permissions vm". vm and vmpool
> 
> Should we autocomplete to --vm-identifier or show "vm" and "vmpool" as
> options

you can't do that as you have ambiguity at /vm e.g
"list permissions vm" vm can stand for vm or for vmpool,

the right way to solve this use-case is to stop expending vm/vmpool to
--vm-identifier/--vmpool-identifier,

i.e we should append -identifier not at auto-completion time, but at options list
building time, this way you'll have [vm-identifier, vmpool-identifier] in
the options list and auto-completion will only add prefix '--' once
monovalent/definitive expression has been chosen,

this way, machine can easily distinguish between vm-<TAB> and vmpool-<TAB>
Comment 3 Michael Pasternak 2013-11-21 11:14:26 EST
*** Bug 1033079 has been marked as a duplicate of this bug. ***
Comment 4 Michael Pasternak 2013-11-26 03:57:15 EST
fixed in 3.3.0.11-1
Comment 5 Ilia Meerovich 2013-11-26 06:36:07 EST
imeerovi@imeerovi ~/git/ART (master) $ sudo rpm -q rhevm-cli
rhevm-cli-3.3.0.11-1.el6ev.noarch
imeerovi@imeerovi ~/git/ART (master) $ rhevm-shell 


 ==========================================
 >>> connected to RHEVM manager 3.3.0.0 <<<
 ==========================================


        
 ++++++++++++++++++++++++++++++++++++++++++
 
           Welcome to RHEVM shell
 
 ++++++++++++++++++++++++++++++++++++++++++
        
    
[RHEVM shell (connected)]# list permissions v
vm-identifier            vmpool-identifier        vnicprofile-identifier   
[RHEVM shell (connected)]# list permissions vm
vm-identifier       vmpool-identifier   
[RHEVM shell (connected)]# list permissions vm
vm-identifier       vmpool-identifier   
[RHEVM shell (connected)]#
Comment 7 Itamar Heim 2014-01-21 17:14:56 EST
Closing - RHEV 3.3 Released
Comment 8 Itamar Heim 2014-01-21 17:22:22 EST
Closing - RHEV 3.3 Released

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