Bug 1466270

Summary: Incorrect response format (not XML) for REST call on VM creation.
Product: [oVirt] ovirt-engine Reporter: Vitalii Yerys <vyerys>
Component: RestAPIAssignee: Ori Liel <oliel>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.3.4CC: bugs, juan.hernandez, lsvaty, mperina, tjelinek, vyerys
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
Target Release: 4.2.0   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:02:59 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:

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.