Bug 987982 - When adding a host through the REST API, the error message says that "rootPassword" is required, but the actual field name is "root_password"
Summary: When adding a host through the REST API, the error message says that "rootPas...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.4
Assignee: Yaniv Bronhaim
QA Contact: bugs@ovirt.org
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-24 13:50 UTC by Assaf Muller
Modified: 2023-09-14 01:48 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-20 19:05:00 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

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


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