Bug 1466270 - Incorrect response format (not XML) for REST call on VM creation.
Summary: Incorrect response format (not XML) for REST call on VM creation.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.1.3.4
Hardware: x86_64
OS: All
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Ori Liel
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-29 11:35 UTC by Vitalii Yerys
Modified: 2017-12-20 11:02 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:02:59 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 81212 0 master POST Improve Message Format For Invlaid Id Input 2017-08-30 13:11:54 UTC

Description Vitalii Yerys 2017-06-29 11:35:26 UTC
Description of problem:

If VM created with incorrect ID format, response is returned as a string format instead of XML which would be expected.

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

Red Hat Virtualization Manager Version: 4.1.3.4-0.1.el7

How reproducible:

100%

Steps to Reproduce:
1. try creating VM via REST with following request:

POST
<vm id="11111">
    <name>test_vm_name</name>
    <description>test_vm_description</description>
    <display>
        <type>spice</type>
    </display>
    <os>
        <type>rhel_7x64</type>
...
</vm>

Full example here:

http://pastebin.test.redhat.com/498840

Actual results:

Invalid UUID string: 11111

Expected results:

<fault>
    <detail>[Invalid UUID string: 11111.]</detail>
    <reason>Operation Failed</reason>
</fault>

Additional info:

Comment 1 Tomas Jelinek 2017-06-30 07:40:37 UTC
This happens on all collections I have tried (vms, clusters, permissions...).

Seems like an infra issue/decision. Moving to infra to decide.

Comment 2 Juan Hernández 2017-06-30 09:27:17 UTC
I agree this should be improved. Ori, can you take a look?

Comment 3 Red Hat Bugzilla Rules Engine 2017-06-30 09:27:22 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 4 Ori Liel 2017-08-30 12:55:05 UTC
Patch posted: 

  https://gerrit.ovirt.org/#/c/81212

Comment 5 Radim Hrazdil 2017-09-06 07:33:08 UTC
Verified in 4.2.0-0.0.master.20170903205106.gitb17261a.el7.centos

Comment 6 Sandro Bonazzola 2017-12-20 11:02:59 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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