From e0409f6df3b7de7be3700a05b2f917e8d87f82e8 Mon Sep 17 00:00:00 2001 From: Stavros Kois Date: Wed, 4 Dec 2024 14:48:22 +0200 Subject: [PATCH] typo --- .../middlewared/plugins/apps/schema_normalization.py | 2 +- .../unit/plugins/apps/test_normalize_gpu_options.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/middlewared/middlewared/plugins/apps/schema_normalization.py b/src/middlewared/middlewared/plugins/apps/schema_normalization.py index 6ff7236983489..c2ef5f3df2be0 100644 --- a/src/middlewared/middlewared/plugins/apps/schema_normalization.py +++ b/src/middlewared/middlewared/plugins/apps/schema_normalization.py @@ -114,7 +114,7 @@ async def normalize_gpu_configuration(self, attr, value, complete_config, contex } if not any(gpu['vendor'] != 'NVIDIA' for gpu in gpu_choices.values()): value['use_all_gpus'] = False - value['kfd_device_exist'] = os.path.exists('/dev/kfd') + value['kfd_device_exists'] = os.path.exists('/dev/kfd') for nvidia_gpu_pci_slot in list(value['nvidia_gpu_selection']): if nvidia_gpu_pci_slot not in gpu_choices or gpu_choices[nvidia_gpu_pci_slot]['vendor'] != 'NVIDIA': diff --git a/src/middlewared/middlewared/pytest/unit/plugins/apps/test_normalize_gpu_options.py b/src/middlewared/middlewared/pytest/unit/plugins/apps/test_normalize_gpu_options.py index 803fbdc337108..2deb96ea8475e 100644 --- a/src/middlewared/middlewared/pytest/unit/plugins/apps/test_normalize_gpu_options.py +++ b/src/middlewared/middlewared/pytest/unit/plugins/apps/test_normalize_gpu_options.py @@ -30,7 +30,7 @@ ], { 'use_all_gpus': True, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': { '0000:01:00.0': 'NVIDIA GPU 1', '0000:02:00.0': 'NVIDIA GPU 2' @@ -38,7 +38,7 @@ }, { 'use_all_gpus': False, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': {} } @@ -65,12 +65,12 @@ ], { 'use_all_gpus': True, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': {} }, { 'use_all_gpus': True, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': {} } @@ -114,12 +114,12 @@ ], { 'use_all_gpus': True, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': {} }, { 'use_all_gpus': True, - 'kfd_device_exist': False, + 'kfd_device_exists': False, 'nvidia_gpu_selection': {} }