From fa2b0fb2a6a9271af78163032fc2f5449e34bae8 Mon Sep 17 00:00:00 2001 From: Xiaoxue Wang Date: Wed, 21 Aug 2024 13:40:29 +0800 Subject: [PATCH] fix: correct the rhel_ai_version_id source (#359) Signed-off-by: Xiaoxue Wang --- dev/test-archives/core-base/data/etc/os-release | 2 +- src/puptoo/process/profile.py | 2 +- tests/test_rhel_ai.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/test-archives/core-base/data/etc/os-release b/dev/test-archives/core-base/data/etc/os-release index 72882845..6900142a 100644 --- a/dev/test-archives/core-base/data/etc/os-release +++ b/dev/test-archives/core-base/data/etc/os-release @@ -18,4 +18,4 @@ REDHAT_SUPPORT_PRODUCT_VERSION="9.4" OSTREE_VERSION='9.20240630.0' VARIANT_ID=rhel_ai VARIANT="RHEL AI" -BUILD_ID='v1.1.3' +RHEL_AI_VERSION_ID='v1.1.3' diff --git a/src/puptoo/process/profile.py b/src/puptoo/process/profile.py index 18e7f328..3a91b21a 100644 --- a/src/puptoo/process/profile.py +++ b/src/puptoo/process/profile.py @@ -755,7 +755,7 @@ def system_profile( if variant_id == 'rhel_ai': rhel_ai_profile = { "variant": os_release_parser.get("VARIANT"), - "rhel_ai_version_id": os_release_parser.get("BUILD_ID"), + "rhel_ai_version_id": os_release_parser.get("RHEL_AI_VERSION_ID"), } if nvidia_smi_l: rhel_ai_profile["nvidia_gpu_models"] = [gpu["model"] for gpu in nvidia_smi_l] diff --git a/tests/test_rhel_ai.py b/tests/test_rhel_ai.py index 219e05e8..99c13e98 100644 --- a/tests/test_rhel_ai.py +++ b/tests/test_rhel_ai.py @@ -24,7 +24,7 @@ OSTREE_VERSION='9.20240630.0' VARIANT_ID=rhel_ai VARIANT="RHEL AI" -BUILD_ID='v1.1.3' +RHEL_AI_VERSION_ID='v1.1.3' """.strip() OS_RELEASE_RHEL = """