Bug 1390560

Summary: Can't remap network/profile to be 'Empty' on target DC when importing VM from data domain
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Yevgeny Zaspitsky <yzaspits>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, danken
Target Milestone: ovirt-4.1.0-alphaFlags: rule-engine: ovirt-4.1+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 14:57:55 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:
Bug Depends On:    
Bug Blocks: 1277675    
Attachments:
Description Flags
engine log none

Description Michael Burman 2016-11-01 12:05:25 UTC
Description of problem:
Can't remap network/profile to be 'Empty' on target DC when importing VM from data domain.

Map network to empty profile
2016-11-01 13:43:27,945 - Dummy-1 - storagedomains - DEBUG - Action request content is --  url:/ovirt-engine/api/storagedomains/009a842a-ed19-44b3-a130-b5b89f0593e4/vms/b639af6f-9204-4dc6-bc
38-f35a8c8205fc/register body:<action>
   <async>false</async>
   <cluster>
       <name>golden_env_mixed_1</name>
   </cluster>
   <grace_period>
       <expiry>10</expiry>
   </grace_period>
   <reassign_bad_macs>false</reassign_bad_macs>
   <vnic_profile_mappings>
       <vnic_profile_mapping>
           <source_network_name>C10_reg_dom1</source_network_name>
           <source_network_profile_name>C10_reg_dom1</source_network_profile_name>
       </vnic_profile_mapping>
   </vnic_profile_mappings>
</action> 


2016-11-01 13:43:27,946 - Dummy-1 - storagedomains - INFO - Using Correlation-Id: storagedomains_syncAction_024cbb3b-4305-494f
2016-11-01 13:43:28,156 - Dummy-1 - core_api - DEBUG - Request POST response time: 0.186
2016-11-01 13:43:28,157 - Dummy-1 - storagedomains - DEBUG - Cleaning Correlation-Id: storagedomains_syncAction_024cbb3b-4305-494f
2016-11-01 13:43:28,157 - Dummy-1 - api_utils - ERROR - Failed to syncAction element NOT as expected:
       Status: 400
       Reason: Bad Request
       Detail: vNic profile mapping is missing target vNic profile.


Version-Release number of selected component (if applicable):
4.1.0-0.0.master.20161031231324.git5d8702e.el7.centos.noarch + Yevgeny rpms

How reproducible:
100%

Steps to Reproduce:
1. Import VM from data domain and try to remap to an 'empty' network/profile(don't send target)

Actual results:
Failed. vNic profile mapping is missing target vNic profile

Expected results:
Should work

Additional info:
We are testing Yevgeny rpms on latest master.

Comment 1 Michael Burman 2016-11-01 12:22:53 UTC
Created attachment 1216089 [details]
engine log

Comment 2 Dan Kenigsberg 2016-12-05 09:54:11 UTC
I do not have the patch to prove that, but I believe the fix has already been merged to the REST api of this feature.

Comment 3 Michael Burman 2016-12-05 10:07:04 UTC
Verified on - 4.1.0-0.2.master.20161204231323.gite9669ad.el7.centos