Bug 1467384

Summary: [VMware]REST VM Provision creates provider network
Product: Red Hat CloudForms Management Engine Reporter: Leo Khomenko <lkhomenk>
Component: ProvisioningAssignee: Lucy Fu <lufu>
Status: CLOSED NOTABUG QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: medium    
Version: 5.8.0CC: anewman, gblomqui, gmccullo, jfrey, jhardy, obarenbo
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rest:provision
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-14 20:32:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
network config example after VM got provisione none

Description Leo Khomenko 2017-07-03 15:15:16 UTC
Created attachment 1293920 [details]
network config example after VM got provisione

Description of problem:If we provision VM via CFME REST into vlan inside DSwitsh CFME creates provider network on provider's side
ex.1)(rest-api) [RESTAPI] POST https://10.8.198.102/api/provision_requests {'action': u'create', 'resource': {'additional_values': {'request_id': '1001'}, 'tags': {'cc': '001', 'network_location': 'Internal'}, 'ems_custom_attributes': {}, 'template_fields': {'guid': u'8668e9b2-5fe0-11e7-a33c-001a4a470f62'}, 'miq_custom_attributes': {}, 'version': '1.1', 'requester': {'owner_first_name': 'John', 'owner_email': 'jdoe', 'user_name': 'admin', 'owner_last_name': 'Doe', 'auto_approve': True}, 'vm_fields': {'vm_name': 'test_rest_prov_kfnZaJIsA1', 'vm_memory': '2048', 'number_of_cpus': 1, 'vlan': 'DPortGroup'}}} (/home/lkhomenk/.virtualenvs/CFME/local/lib/python2.7/site-packages/manageiq_client/api.py:95)
ex.2)(rest-api) [RESTAPI] POST https://10.8.198.102/api/provision_requests {'action': u'create', 'resource': {'additional_values': {'request_id': '1001'}, 'tags': {'cc': '001', 'network_location': 'Internal'}, 'ems_custom_attributes': {}, 'template_fields': {'guid': u'8668e9b2-5fe0-11e7-a33c-001a4a470f62'}, 'miq_custom_attributes': {}, 'version': '1.1', 'requester': {'owner_first_name': 'John', 'owner_email': 'jdoe', 'user_name': 'admin', 'owner_last_name': 'Doe', 'auto_approve': True}, 'vm_fields': {'vm_name': 'test_rest_prov_PznYxNyPFN', 'vm_memory': '2048', 'vlan': 'DPortGroup', 'placement_host_name': 'env-nvc55-h01.cfme2.lab.eng.rdu2.redhat.com', 'number_of_cpus': 1, 'placement_ds_name': 'iSCSI-Datastore-1'}}} 

Version-Release number of selected component (if applicable): 
CFME: 5.8.1.0.20170623170756_3ed4411 
Virtualcenter: 5.5 / 6.5

How reproducible:100%


Steps to Reproduce:
1.Provision VM with request from examples 


Actual results: Provision request succeeds but new provider network gets created


Expected results: VM should be provisioned to vlan into DVPortGroup vlan


Additional info: To provision into DVPortGroup vlan we should use UI and select host/datastore before we select vlan.