Bug 1238590

Summary: Add storage domain via REST-API fails with the message "null is not a member of StorageFormat" when sending the <format> parameter
Product: Red Hat Enterprise Virtualization Manager Reporter: Allon Mureinik <amureini>
Component: ovirt-engineAssignee: Idan Shaby <ishaby>
Status: CLOSED CURRENTRELEASE QA Contact: Carlos Mestre González <cmestreg>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: acanan, bazulay, bugs, gklein, ishaby, juan.hernandez, lsurette, melewis, pstehlik, rbalakri, Rhev-m-bugs, yeylon, ykaul, ylavi
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.6.0-4_alpha3 Doc Type: Bug Fix
Doc Text:
Previously, when adding a storage domain via the REST API, or any SDK, the format field was unused but mandatory. Now, when adding a storage domain via the REST API, or any SDK, the format field is no longer required.
Story Points: ---
Clone Of: 1238119 Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1238119    
Bug Blocks:    

Description Allon Mureinik 2015-07-02 08:39:50 UTC
+++ This bug was initially created as a clone of Bug #1238119 +++

Description of problem:
Legitimate add storage domain request via the REST API fails with the message "null is not a member of StorageFormat. Possible values for StorageFormat are: v1, v2, v3".

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

How reproducible:
100%

Steps to Reproduce:
1. Send a POST request to http://localhost:8080/api/storagedomains :

<storage_domain>
   <host id="41aaa3cd-8588-46e5-b85e-e75fb67f8429"></host>
   <name>export_domain_sd2</name>
   <type>export</type>
   <storage>
      <type>nfs</type>
      <address>multipass.eng.lab.tlv.redhat.com</address>
      <path>/home/kvm/rnd/ishaby/sd2</path>
   </storage>
   <format>true</format>
</storage_domain>

Actual results:


Expected results:
The response is 400 Bad Request and the body is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <reason>Invalid value</reason>
    <detail>null is not a member of StorageFormat. Possible values for StorageFormat are: v1, v2, v3</detail>
</fault>


Additional info:
-------------------------------------------------------------------------------
This is a RHEV clone so RHEV's docs can pick up the doctext.

Comment 1 Carlos Mestre González 2015-09-22 10:56:03 UTC
verified on rhevm-3.6.0-0.16.master.el6.noarch

Comment 3 Allon Mureinik 2016-03-10 10:49:49 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 4 Allon Mureinik 2016-03-10 10:51:01 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE

Comment 5 Allon Mureinik 2016-03-10 12:07:36 UTC
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE