We want to backport the fast8 test patch[1] to victoria to impove the stable/* branch's stability, but the cyborg-tempest-plugin is failed with device_profile case, more details as below:
[1] https://review.opendev.org/c/openstack/cyborg/+/782134
temporary zuul log: https://fe19825ced86363d9b21-5da8dd525c228407ee4661a46790293d.ssl.cf1.rackcdn.com/782134/3/check/cyborg-tempest/9997266/testr_results.html
ft1.3: cyborg_tempest_plugin.tests.api.test_device_profile.TestDeviceProfileController.test_get_and_delete_device_profiletesttools.testresult.real._StringException: pythonlogging:'': {{{
2021-03-24 10:50:58,921 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 201 POST http://10.209.97.94/accelerator/v2/device_profiles 0.022s
2021-03-24 10:50:58,922 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: b'[{"name": "fpga-num-1-dp1", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}]}]'
Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '364', 'content-type': 'application/json', 'x-openstack-request-id': 'req-262e3763-b734-4f41-a48f-4797333c6cee', 'connection': 'close', 'status': '201', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles'}
Body: b'{"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:58+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}'
2021-03-24 10:50:58,939 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 200 GET http://10.209.97.94/accelerator/v2/device_profiles 0.016s
2021-03-24 10:50:58,939 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: None
Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '387', 'content-type': 'application/json', 'x-openstack-request-id': 'req-a5c0101c-15b9-44be-b6b1-5970790d3a9a', 'connection': 'close', 'status': '200', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles'}
Body: b'{"device_profiles": [{"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:59+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}]}'
2021-03-24 10:50:58,955 77157 INFO [tempest.lib.common.rest_client] Request (TestDeviceProfileController:test_get_and_delete_device_profile): 200 GET http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e 0.015s
2021-03-24 10:50:58,955 77157 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
Body: None
Response - Headers: {'date': 'Wed, 24 Mar 2021 10:50:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'vary': 'OpenStack-API-Version', 'openstack-api-minimum-version': '2.0', 'openstack-api-maximum-version': '2.1', 'openstack-api-version': '2.0', 'content-length': '384', 'content-type': 'application/json', 'x-openstack-request-id': 'req-cb040b3e-0694-4730-99f1-b2acf40baf9e', 'connection': 'close', 'status': '200', 'content-location': 'http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e'}
Body: b'{"device_profile": {"name": "fpga-num-1-dp1", "description": null, "uuid": "398052aa-7ed7-4cb9-be83-f5735932a10e", "groups": [{"resources:FPGA": "1", "trait:CUSTOM_FAKE_DEVICE": "required"}], "created_at": "2021-03-24 10:50:59+00:00", "updated_at": "None", "links": [{"href": "http://10.209.97.94/accelerator/v2/device_profiles/398052aa-7ed7-4cb9-be83-f5735932a10e", "rel": "self"}]}}'
}}}
Traceback (most recent call last):
File "/opt/stack/tempest/.tox/tempest/lib/python3.8/site-packages/cyborg_tempest_plugin/tests/api/test_device_profile.py", line 53, in test_get_and_delete_device_profile
self.assertEqual(dp[0]['name'], response['name'])
KeyError: 'name'
This is because the dp get api return result has been modified[1]
we should add the 'device_profile' key in the return result on the master branch and backport to V and then modify the tempest-plugin test by add 'device_profile' key.
[1] https:/ /review. opendev. org/c/openstack /cyborg/ +/751988