Bug 969097

Summary: RHEVM-CLI: "power management user name" flag usage, wasn't updated as in help and auto complete
Product: Red Hat Enterprise Virtualization Manager Reporter: Barak Dagan <bdagan>
Component: ovirt-engine-restapiAssignee: Ori Liel <oliel>
Status: CLOSED CURRENTRELEASE QA Contact: Barak Dagan <bdagan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, bazulay, cpelland, iheim, jkt, oramraz, pstehlik, Rhev-m-bugs
Target Milestone: ---Keywords: Regression, ZStream
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: is2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 970237 (view as bug list) Environment:
Last Closed: 2014-01-21 22:16:46 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: 970237, 977354    

Description Barak Dagan 2013-05-30 16:03:50 UTC
Description of problem:
Flag was changed from power-management-username to power-management-user_name in both help and auto completion, however the cli works with the old name, while rejecting the new one. 

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

SF 17.3

backend version: 3.2
sdk version    : 3.2.0.11
cli version    : 3.2.0.9
python version : 2.6.6.final.0

How reproducible:
100%

Steps to Reproduce:

1. Using auto completion:
[RHEVM shell (connected)]# update host 'rose02' --storage_manager-priority 5 --power_management-user_name 'user'


error: "user_name" is invalid argument segment.

2. Using old flag
[RHEVM shell (connected)]# update host 'rose02' --storage_manager-priority 5 --power_management-username 'user'

id                                : 739107e5-6dc2-4506-926f-aae9009e6f03
name                              : rose02
address                           : rose02.qa.lab.tlv.redhat.com
....

3. help:
[RHEVM shell (connected)]# help add host

USAGE
  
  add <type> [parent identifiers] [command options]
  
DESCRIPTION
  
  Creates a new object or adds existent with type host. See 'help add' for generic
  help on creating objects.
  
ATTRIBUTE OPTIONS
  
  The following options are available for objects with type host:
  
...
    * [--power_management-enabled: boolean]
    * [--power_management-address: string]
    * [--power_management-user_name: string]
    * [--power_management-password: string]

Actual results:


Expected results:


Additional info:

Comment 6 Barak Dagan 2013-07-01 16:09:57 UTC
Verified on SF18.2

RSDL:

1) href="/api/hosts" rel="add">
<parameter required="false" type="xs:string"><name>host.power_management.username</name>
</parameter>

2) href="/api/hosts/{host:id}" rel="update">
<parameter required="false" type="xs:string"><name>host.power_management.username</name>
</parameter>

REST:

1) Update PM

PUT request content is --  url:api/hosts/24a98a45-c1e6-40b0-851d-f6e70aafaf7b body: <host>
<power_management type="apc_snmp">
<enabled>true</enabled>
<address>1.1.1.2</address>
<username>aaa</username>
<password>pswrd</password>
<options>
   <option name="slot" value="2"/>
</options>
<pm_proxies>
   <pm_proxy>
       <type>cluster</type>
   </pm_proxy>
   <pm_proxy>
     <type>dc</type>
   </pm_proxy>
</pm_proxies>

<agents>
	   <agent type="apc_snmp">
	   <address>1.1.1.2</address>
	   <username>aaa</username>
	   <password>pswrd</password>
	   <concurrent>false</concurrent>
	   <order>1</order>   
	   </agent>
</agents>
</power_management>
</host>

Comment 7 Barak Dagan 2013-07-02 08:42:23 UTC
Verified on IS3
---------------

Comment 9 Itamar Heim 2014-01-21 22:16:46 UTC
Closing - RHEV 3.3 Released

Comment 10 Itamar Heim 2014-01-21 22:23:27 UTC
Closing - RHEV 3.3 Released