Fix the typo of device profile name

Change-Id: I94245b1846c55534071a5c6a7b19da4967421e9d
This commit is contained in:
songwenping 2021-12-18 15:51:31 +08:00
parent ad0a4b2ef1
commit 10473cd68a
3 changed files with 12 additions and 12 deletions

View File

@ -104,7 +104,7 @@ class TestDeviceProfileController(v2_test.APITestV2):
@mock.patch('cyborg.objects.DeviceProfile.list')
def test_get_all_by_name(self, mock_dp):
mock_dp.return_value = self.fake_dp_objs
name = 'afaas_example_1'
name = 'dp_example_1'
data = self.get_json(self.DP_URL + '?name=' + name,
headers=self.headers)
out_dps = data['device_profiles']

View File

@ -36,8 +36,8 @@ def _get_device_profiles_as_dict():
dp1 = {
"id": 1,
"uuid": "a95e10ae-b3e3-4eab-a513-1afae6f17c51",
"name": 'afaas_example_1',
"description": "fake-afaas_example_1-desc",
"name": 'dp_example_1',
"description": "fake-dp_example_1-desc",
"created_at": date1,
"updated_at": None,
"groups": [
@ -53,10 +53,10 @@ def _get_device_profiles_as_dict():
dp2 = {
"id": 2,
"uuid": u"199c46b7-63a7-431b-aa40-35da4b9420b1",
"name": 'daas_example_2',
"name": 'dp_example_2',
"created_at": date2,
"updated_at": None,
"description": "fake-daas_example_2-desc",
"description": "fake-dp_example_2-desc",
"groups": [
{"resources:FPGA": "1",
"trait:CUSTOM_REGION_ID_3ACD": "required",

View File

@ -20,7 +20,7 @@ from cyborg.objects.extarq import fpga_ext_arq
def _get_arqs_as_dict():
common = {
"state": "Bound",
"device_profile_name": "afaas_example_1",
"device_profile_name": "dp_example_1",
"hostname": "myhost",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7144",
"attach_handle_type": "PCI",
@ -91,7 +91,7 @@ def _get_arqs_resloved_as_dict():
{"uuid": 'a097fefa-da62-4630-8e8b-424c0e3426dd',
"device_profile_group_id": 0,
"state": "Initial",
"device_profile_name": "afaas_example_1",
"device_profile_name": "dp_example_1",
"device_rp_uuid": None,
"hostname": None,
"instance_uuid": None,
@ -104,7 +104,7 @@ def _get_arqs_resloved_as_dict():
"device_profile_group_id": 1,
"device_rp_uuid": "fbd485e1-40b1-4a7e-84b9-f6b6959114a5",
"state": "Bound",
"device_profile_name": "afaas_example_1",
"device_profile_name": "dp_example_1",
"hostname": "myhost",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7144",
"attach_handle_type": "PCI",
@ -132,7 +132,7 @@ def _get_arqs_bind_as_dict():
common = [
{
"state": "Bound",
"device_profile_name": "afaas_example_1",
"device_profile_name": "dp_example_1",
"hostname": "myhost1",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7144",
"attach_handle_type": "PCI",
@ -147,7 +147,7 @@ def _get_arqs_bind_as_dict():
"device_profile_group": {"resources:GPU": "1"}
}, {
"state": "Deleting",
"device_profile_name": "afaas_example_2",
"device_profile_name": "dp_example_2",
"hostname": "myhost1",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7144",
"attach_handle_type": "PCI",
@ -164,7 +164,7 @@ def _get_arqs_bind_as_dict():
"resources:FPGA": "1"}
}, {
"state": "Deleting",
"device_profile_name": "afaas_example_3",
"device_profile_name": "dp_example_3",
"hostname": "myhost3",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7146",
"attach_handle_type": "PCI",
@ -182,7 +182,7 @@ def _get_arqs_bind_as_dict():
"accel:bitstream_id": "b069d97a-010a-4057-b70d-eca2b337fc9e"}
}, {
"state": "Unbound",
"device_profile_name": "afaas_example_2",
"device_profile_name": "dp_example_2",
"hostname": "myhost1",
"instance_uuid": "5922a70f-1e06-4cfd-88dd-a332120d7144",
"attach_handle_type": "PCI",