Bug 1008164

Summary: [RHEVM-CLI] Auto complete suggests wrong parameter for update cluster
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-cliAssignee: Michael Pasternak <mpastern>
Status: CLOSED NOTABUG QA Contact: Elena <edolinin>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, bazulay, iheim, oramraz, pstehlik, Rhev-m-bugs, srevivo, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-15 11:43:38 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:

Description Barak Dagan 2013-09-15 11:21:11 UTC
Description of problem:
update cluster auto completes --datacenter-identifier instead of --data-center-id (which appears in the list, and in the rsdl file):

[RHEVM shell]# update cluster cl4 --datacenter-identifier d70faa55-0411-43a0-9d13-52374b7ec234


error: cluster cl4 does not exist.


[RHEVM shell (connected.161.51)]# update cluster cl4 

data_center-id                               name                                         version-major
datacenter                                   scheduling_policy-

[RHEVM shell]# update cluster cl4 --data_center-id d70faa55-0411-43a0-9d13-52374b7ec234

id                                         : aebb7446-e8fc-4b22-b3af-5e6fe0437c3e
name                                       : cl4
ballooning_enabled                         : False
cpu-id                                     : Intel Conroe Family
data_center-id                             : d70faa55-0411-43a0-9d13-52374b7ec234
....


RSDL: 

<link href="/api/clusters/{cluster:id}" rel="update">
<description>update the specified cluster in the system</description>
<request>
<http_method>PUT</http_method>
<headers>
</headers>
<body>
<type>Cluster</type>
<parameters_set>
<description>update the specified cluster in the system. The capabilities like virt servicem luster service, tarnsparent huge pages etc can be changed.</description>
...
<parameter required="false" type="xs:string">
<name>cluster.data_center.id</name>
</parameter>
...

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

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Michael Pasternak 2013-09-15 11:43:38 UTC
(In reply to Barak Dagan from comment #0)
> Description of problem:
> update cluster auto completes --datacenter-identifier instead of
> --data-center-id (which appears in the list, and in the rsdl file):
> 
> [RHEVM shell]# update cluster cl4 --datacenter-identifier
> d70faa55-0411-43a0-9d13-52374b7ec234
> 

barak, i'm looking on a shell/sdk released at is14, and update cluster
options are:
=======================================================================

[oVirt shell (connected)]# update cluster Default data
data_center-id  datacenter  <=== as you can see --data_center-id is there

--datacenter-identifier is used to identify cluster against specific DC:
========================================================================

[oVirt shell (connected)]# update cluster Default --description aaa --datacenter-identifier Default

id                                         : 99408929-82cf-4dc7-a532-9d998063fa95
name                                       : Default
description                                : aaa
ballooning_enabled                         : False
cpu-id                                     : Intel Conroe Family
data_center-id                             : 5849b030-626e-47cb-ad90-3ce782d831b3
error_handling-on_error                    : migrate
gluster_service                            : False
memory_policy-overcommit-percent           : 100
memory_policy-transparent_hugepages-enabled: True
scheduling_policy-policy                   : none
threads_as_cores                           : False
trusted_service                            : False
tunnel_migration                           : False
version-major                              : 3
version-minor                              : 3
virt_service                               : True


--data_center-id used as a parameter to move cluster to another DC:
==================================================================

[oVirt shell (connected)]# update cluster Default --description bbb --data_center-id 99408929-82cf-4dc7-a532-9d998063fa95

error: 
status: 409
reason: Conflict
detail: Cannot change Data Center association when editing a Cluster.

 - and as you can see both working as expected, also please note that
*all* --XXX-identifier options in *all* commands are used to identify
the given resource in different contexts.