Bug 1027298 - [RHEVM-CLI] mismatch between restore snapshot syntax and auto completion
[RHEVM-CLI] mismatch between restore snapshot syntax and auto completion
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 high
: ---
: 3.3.0
Assigned To: Juan Hernández
Barak Dagan
infra
: Regression
Depends On:
Blocks: 3.3rc1
  Show dependency treegraph
 
Reported: 2013-11-06 08:57 EST by Barak Dagan
Modified: 2016-02-10 14:24 EST (History)
9 users (show)

See Also:
Fixed In Version: is28
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 22082 None None None Never
oVirt gerrit 22090 None None None Never

  None (edit)
Description Barak Dagan 2013-11-06 08:57:10 EST
Description of problem:
auto completion for restore snapshot is:
action snapshot --vm-identifier  restore

filling in the missing values, results "error: syntax error"

action snapshot --vm-identifier vmname restore snapid


The working syntax appears to be:
action snapshot snapid restore --vm-identifier vmname. In that syntax the action (restore) is not suggested after snapid, but "--vm-identifier  restore" again.

Version-Release number of selected component (if applicable):
is21

How reproducible:
100%

Steps to Reproduce:
1. see above
2.
3.

Actual results:
Getting the right syntax for restoring snapshot requires many tries

Expected results:
Auto completion guides for the correct syntax

Additional info:
Comment 1 Michael Pasternak 2013-11-06 09:39:37 EST
ravi,

this is sounds like regression on one of latest auto-completion manipulations.
Comment 5 Itamar Heim 2013-12-13 13:22:52 EST
michael - bug is flagged for 3.3.z, should probably be fixed?
Comment 6 Michael Pasternak 2013-12-15 02:39:15 EST
(In reply to Itamar Heim from comment #5)
> michael - bug is flagged for 3.3.z, should probably be fixed?

currently sdk/cli are flat to 3.3 (no z yet), i think there is no point of
having Z for shell cause it's not like it fixes specific issue for given version
of api/sdk, it just addresses own problem, (also we can ship 3.3.0.12-1 to Z if
we really want), is this an issue?
Comment 8 Barak Dagan 2013-12-24 06:05:30 EST
verified on is28.1:

sdk version    : 3.3.0.21.*final-.1
cli version    : 3.3.0.12.*final-.1
python version : 2.6.6.final.0


The CLI change the command from:

# action snapshot snapid --vm-identifier MyVm restore

to 

# action snapshot snapid restore --vm-identifier MyVm

This is the first time I see such a behaviour, the auto completion still complete in the wrong order, but the command is fixed during execution
Comment 9 Michael Pasternak 2013-12-24 06:15:57 EST
(In reply to Barak Dagan from comment #8)
> verified on is28.1:
> 
> sdk version    : 3.3.0.21.*final-.1
> cli version    : 3.3.0.12.*final-.1
> python version : 2.6.6.final.0
> 
> 
> The CLI change the command from:
> 
> # action snapshot snapid --vm-identifier MyVm restore
> 
> to 
> 
> # action snapshot snapid restore --vm-identifier MyVm
> 
> This is the first time I see such a behaviour, the auto completion still
> complete in the wrong order, but the command is fixed during execution

this is an chicken & egg situation, you can't figure out what actions available
till you specify the context (vm in your case),

now cli is able to recognize such cases and address the syntax at runtime
Comment 11 Itamar Heim 2014-01-21 17:32:41 EST
Closing - RHEV 3.3 Released
Comment 12 Itamar Heim 2014-01-21 17:32:48 EST
Closing - RHEV 3.3 Released

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