Bug 1027298 - [RHEVM-CLI] mismatch between restore snapshot syntax and auto completion
Summary: [RHEVM-CLI] mismatch between restore snapshot syntax and auto completion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.3.0
Assignee: Juan Hernández
QA Contact: Barak Dagan
URL:
Whiteboard: infra
Depends On:
Blocks: 3.3rc1
TreeView+ depends on / blocked
 
Reported: 2013-11-06 13:57 UTC by Barak Dagan
Modified: 2016-02-10 19:24 UTC (History)
9 users (show)

Fixed In Version: is28
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 22082 0 None None None Never
oVirt gerrit 22090 0 None None None Never

Description Barak Dagan 2013-11-06 13:57:10 UTC
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 14:39:37 UTC
ravi,

this is sounds like regression on one of latest auto-completion manipulations.

Comment 5 Itamar Heim 2013-12-13 18:22:52 UTC
michael - bug is flagged for 3.3.z, should probably be fixed?

Comment 6 Michael Pasternak 2013-12-15 07:39:15 UTC
(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 11:05:30 UTC
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 11:15:57 UTC
(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 22:32:41 UTC
Closing - RHEV 3.3 Released

Comment 12 Itamar Heim 2014-01-21 22:32:48 UTC
Closing - RHEV 3.3 Released


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