Bug 1027281

Summary: [RHEVM-SHELL]: x-identifier auto-completion doesn't work in permissions context for vm object
Product: Red Hat Enterprise Virtualization Manager Reporter: Michael Pasternak <mpastern>
Component: ovirt-engine-cliAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Ilia Meerovich <iliam>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, bazulay, iheim, oramraz, Rhev-m-bugs, rmcswain, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is25 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:14:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1038284    

Description Michael Pasternak 2013-11-06 13:23:22 UTC
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 21:43:09 UTC
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 12:48:37 UTC
(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 16:14:26 UTC
*** Bug 1033079 has been marked as a duplicate of this bug. ***

Comment 4 Michael Pasternak 2013-11-26 08:57:15 UTC
fixed in 3.3.0.11-1

Comment 5 Ilia Meerovich 2013-11-26 11:36:07 UTC
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 22:14:56 UTC
Closing - RHEV 3.3 Released

Comment 8 Itamar Heim 2014-01-21 22:22:22 UTC
Closing - RHEV 3.3 Released