Created attachment 1501402 [details] vnic_profile REST API 4.3 vs 4.2 Description of problem: The links under: "/ovirt-engine/api/vnicprofiles" point to: "/ovirt-engine/api/networks/[NETWORK-ID]/vnicprofiles/[VNIC-PROFILE-ID]" instead of: "/ovirt-engine/api/vnicprofiles/[VNIC-PROFILE-ID]" as it was at v4.2 Got error 405-"Method Not Allowed" while trying to modify (PUT) vnic_profile through REST API Version-Release number of selected component (if applicable): 4.3.0-0.0.master.20181101091940.git61310aa.el7 How reproducible: 100% Steps to Reproduce: 1. Browse to: https://engine-fqdn:/ovirt-engine/api/vnicprofiles 2. 3. Actual results: "/ovirt-engine/api/vnicprofiles/[VNIC-PROFILE-ID]" Expected results: "/ovirt-engine/api/networks/[NETWORK-ID]/vnicprofiles/[VNIC-PROFILE-ID]" Additional info: See attached: vnic_profile REST API 4.3 vs 4.2 Art logs: 2018-11-01 11:11:56,741 - MainThread - root - INFO - Prepare vnic profile object for create or update with {'custom_properties': 'clear', 'name': 'ovirtmgmt', 'data_center': 'golden_env_mixed'} 2018-11-01 11:11:56,741 - MainThread - vnicprofiles - DEBUG - PUT request content is -- url:/ovirt-engine/api/networks/55744e4e-f16e-46dd-a694-8442330d1900/vnicprofiles/973d994c-978a-43d1-b327-c383477dcc61 body:<vnic_profile> <name>ovirtmgmt</name> <custom_properties/> </vnic_profile> 2018-11-01 11:11:56,742 - MainThread - vnicprofiles - INFO - Using Correlation-Id: vnicprofiles_update_f463a7c7-ca77-4dde 2018-11-01 11:11:56,759 - MainThread - core_api - DEBUG - Request PUT response time: 0.010 2018-11-01 11:11:56,759 - MainThread - vnicprofiles - DEBUG - Cleaning Correlation-Id: vnicprofiles_update_f463a7c7-ca77-4dde 2018-11-01 11:11:56,760 - MainThread - vnicprofiles - ERROR - Details was not found on body 2018-11-01 11:11:56,760 - MainThread - api_utils - ERROR - Failed to update element NOT as expected: Status: 405 Reason: Method Not Allowed 2018-11-01 11:11:56,760 - MainThread - vnicprofiles - ERROR - Response code is not valid, expected is: [200, 201], actual is: 405 2018-11-01 11:11:56,760 - MainThread - root - ERROR - Failed to update vnic profile with {'custom_properties': 'clear', 'data_center': 'golden_env_mixed', 'network': 'ovirtmgmt', 'name': 'ovirtmgmt'}
Hi Ori, Can you please take a look at this one? this is blocking us from testing.
Sure, I know what this is about. It results from a correct repair done to the repository of static data about the API structure, used for link-generation purposes. This data was perviously manually maintained, and thus contained many errors. This patch: https://gerrit.ovirt.org/#/c/82294 made the repository 100% correct by replacing the human maintenance with automatic data mining. However in some cases, the result of the repository containing the correct data broke backwards compatibility, in places where particular implementations 'counted on' the repository being wrong. As such cases surface, they are handeled manually by a patch, as in: https://gerrit.ovirt.org/#/c/94909 It's important to stress that not all cases were foreseeable at the time of submitting https://gerrit.ovirt.org/#/c/82294/, at least not without manual testing of every single endpoint in the API, something which was not feasible. I will submit a patch fixing this issue soon
Verified on - 4.3.0-0.2.master.20181121071050.gita8fcd23.el7
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019. Since the problem described in this bug report should be resolved in oVirt 4.3.0 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.