Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 987982

Summary: When adding a host through the REST API, the error message says that "rootPassword" is required, but the actual field name is "root_password"
Product: [Retired] oVirt Reporter: Assaf Muller <amuller>
Component: ovirt-engine-apiAssignee: Yaniv Bronhaim <ybronhei>
Status: CLOSED NEXTRELEASE QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: acathrow, iheim, juan.hernandez, oliel, sbonazzo
Target Milestone: ---   
Target Release: 3.3.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-20 19:05:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Assaf Muller 2013-07-24 13:50:16 UTC
Description of problem:
When adding an host with a name and address through the REST API, the error message says that "rootPassword" is required, but the actual field name is "root_password"

Version-Release number of selected component (if applicable):
oVirt Engine Version: 3.3.0-0.3.beta1.fc19

How reproducible:
100%

Steps to Reproduce:
1. Send a POST to /api/hosts with:
<host>
<name>David Bowie</name>
<address>8.8.8.8</address>
</host>

Actual results:
Error message returned:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
<reason>Incomplete parameters</reason>
<detail>Host [rootPassword] required for add</detail>
</fault>

Expected results:
The error message should return "root_password" instead.

Sending:
<host>
<name>David Bowie</name>
<address>8.8.8.8</address>
<rootPassword>1</rootPassword>
</host>

Returns the same error message (rootPassword is required).

Sending:
<host>
<name>David Bowie</name>
<address>8.8.8.8</address>
<root_password>1</root_password>
</host>

Works. Thus the error message should say that "root_password" is required.

Comment 1 Michael Pasternak 2013-07-24 14:45:35 UTC
the representation of this variable very on the content-type you choose
to communicate with the server, in your case it's "root_password" cause
you use xml, for yaml/json it will be rootPassword (for now till we support it),
therefore we've decided to keep it general in java format for all content-types
till we officially align with the jaxb arguments representation

Comment 2 Sandro Bonazzola 2013-11-15 10:56:42 UTC
Re-targeting to 3.3.2 since 3.3.0 has been released.

Comment 3 Sandro Bonazzola 2013-11-28 15:34:33 UTC
Re-targeting to 3.3.3 since the bug is not resolved in 3.3.2 beta and is not blocking 3.3.2 release tracker (bug #1027349)

Comment 4 Yaniv Bronhaim 2014-01-12 09:26:27 UTC
As far as I understand from Michael's comment #1 this is not a bug, it just the representation of the variable in the cli's output (using the yaml/json instead of the xml type).

Any additional treatment for this issue?

Comment 5 Juan Hernández 2014-01-20 19:05:00 UTC
This root password parameter is now marked as optional, renamed to password, and when it is needed and missing the message printed is the following:

  <fault>
    <reason>Operation Failed</reason>
    <detail>[Cannot install Host with empty password.]</detail>
  </fault>

Comment 6 Red Hat Bugzilla 2023-09-14 01:48:18 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days