Created attachment 1389546 [details] api.log Description of problem: When creating provision request on RHEV provider the REST request fails with { "error": { "kind": "internal_server_error", "message": "Provision failed for the following reasons:\n'Network/Network' is required", "klass": "RuntimeError" } } status code: 500 Internal Server Error Version-Release number of selected component (if applicable): 5.9.0.18, 5.9.0.19 Checked that the identical request works as expected on 5.9.0.16 How reproducible: 100% Steps to Reproduce: POST /api/provision_requests {"additional_values": {"request_id": "1001"}, "ems_custom_attributes": {}, "miq_custom_attributes": {}, "requester": {"auto_approve": false, "owner_email": "jdoe", "owner_first_name": "John", "owner_last_name": "Doe", "user_name": "admin"}, "tags": {"cc": "001", "network_location": "Internal"}, "template_fields": {"guid": "<template_guid>"}, "version": "1.1", "vm_fields": {"number_of_cpus": 1, "provision_type": "native_clone", "vlan": "ovirtmgmt", "vm_memory": "2048", "vm_name": "test_rest_prov_B2qNFMMOuF"}}
The vlan field should contain the profile_id (taken from ovirt), '<Empty>' or '<Template>' values. Please refer to https://bugzilla.redhat.com/1449157 doc text for more details. I'm changing the bug to improving the error message in case of wrong value passed to the vlan field. Removing the regression keyword and changing the priority.
I believe as part of resolution of this bug, documentation should be changed. Firstly see 2.7.4 here: https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.6-beta/html/red_hat_cloudforms_rest_api/chap_reference_guide#provision-requests-attribute-groups Description of "vlan" attribute is "vLAN" while in fact it is vNIC profile ID now. Also attribute "vlan" has invalid value in all of the examples here: https://access.redhat.com/documentation/en-us/red_hat_cloudforms/4.6-beta/html/red_hat_cloudforms_rest_api/chap_examples#sect_provisioning_requests
The bug is not a TestBlocker, nor a regression. I'm removing its blocker flag.
*** Bug 1569247 has been marked as a duplicate of this bug. ***
https://github.com/ManageIQ/manageiq/pull/17495
When wrong value is passed to the vlan field the error message is now { "error":{ "kind": "internal_server_error", "message": "Provision failed for the following reasons:\n'Network/Virtual NIC Profile ID or Profile Name (Network Name)' is required", "klass": "RuntimeError" } } While the error is expected and the message makes sense, I'm wondering if "internal server error" with status code 500 is what we expect. In my opinion it should be status code 400 and "kind": "bad_request" as is the case for other requests with wrong values.
I tend to agree with Martin's comment above. Please revise. Moving to ON_DEV.
Removing blocker flag, this bug is not a regression nor blocker, the behavior just changed between RHV versions.
Based of BZ1578393