Bug 1535573

Summary: [REST API] External network creation response body returns invalid external provider ID
Product: [oVirt] ovirt-engine Reporter: Mor <mkalfon>
Component: RestAPIAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: Mor <mkalfon>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.1CC: bugs, danken, dholler, lsvaty, lveyde
Target Milestone: ovirt-4.2.2Keywords: Automation
Target Release: ---Flags: rule-engine: ovirt-4.2+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:19:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Mor 2018-01-17 16:07:51 UTC
Description of problem:
When creating external network through oVirt REST API:

Sending POST on https://<server>/ovirt-engine/api/networks with body:
<network>
 <name>test</name>
 <external_provider id=[EP_ID]/>
 <data_center id=[DC_ID]/>
</network>

Results in:
HTTP CREATED (201)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
...
...
<network href="/ovirt-engine/api/networks/<NET_ID>" id="<NET_ID>">    
    <external_provider href="/ovirt-engine/api/openstacknetworkproviders/<WRONG_ID>" id="<WRONG_ID>"/>
</network>

<WRONG_ID> is invalid provider ID.

Version-Release number of selected component (if applicable):
RHV 4.2.1.1-0.1.el7

How reproducible:
100%

Steps to Reproduce:
1. Create 'test' network using REST and attach it to external provider ID.

Actual results:
Invalid response for external provider ID.

Expected results:
Should be valid.

Additional info:

Comment 1 Mor 2018-01-17 16:16:12 UTC
Created attachment 1382561 [details]
logs

Comment 2 Mor 2018-02-28 08:37:06 UTC
Verified on:
RHV Version 4.2.2.1-0.1

Comment 3 Sandro Bonazzola 2018-03-29 11:19:34 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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