From e4abe9ef6856502046816bc8f13127d72deb37ec Mon Sep 17 00:00:00 2001 From: mhecko Date: Wed, 1 May 2024 22:41:09 +0200 Subject: [PATCH] fix typo in net.ifnames detection --- .../system_upgrade/common/actors/kernelcmdlineconfig/actor.py | 2 +- .../kernelcmdlineconfig/libraries/kernelcmdlineconfig.py | 4 ++-- .../emit_net_naming_scheme/libraries/emit_net_naming.py | 2 +- .../tests/test_emit_net_naming_scheme.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py index 23548bb495..d43b8a73f4 100644 --- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py +++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/actor.py @@ -8,7 +8,7 @@ InstalledTargetKernelInfo, KernelCmdlineArg, LateTargetKernelCmdlineArgTasks, - TargetKernelCmdlineArgTasks, + TargetKernelCmdlineArgTasks ) from leapp.tags import FinalizationPhaseTag, IPUWorkflowTag diff --git a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py index 9d6b9deafa..dc0dfcb853 100644 --- a/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py +++ b/repos/system_upgrade/common/actors/kernelcmdlineconfig/libraries/kernelcmdlineconfig.py @@ -1,5 +1,5 @@ -import re import itertools +import re from leapp import reporting from leapp.exceptions import StopActorExecutionError @@ -10,7 +10,7 @@ InstalledTargetKernelInfo, KernelCmdlineArg, LateTargetKernelCmdlineArgTasks, - TargetKernelCmdlineArgTasks, + TargetKernelCmdlineArgTasks ) KERNEL_CMDLINE_FILE = "/etc/kernel/cmdline" diff --git a/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/libraries/emit_net_naming.py b/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/libraries/emit_net_naming.py index 887d1712cc..82752196e4 100644 --- a/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/libraries/emit_net_naming.py +++ b/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/libraries/emit_net_naming.py @@ -22,7 +22,7 @@ def is_net_scheme_compatible_with_current_cmdline(): allows_predictable_names = True already_has_a_net_naming_scheme = False for param in kernel_cmdline.parameters: - if param.key == 'net.ifname': + if param.key == 'net.ifnames': if param.value == '0': allows_predictable_names = False elif param.value == '1': diff --git a/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py b/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py index 2f912b6fcf..08f8323845 100644 --- a/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py +++ b/repos/system_upgrade/el8toel9/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py @@ -17,8 +17,8 @@ ('kernel_args', 'should_be_compatible'), [ ([KernelCmdlineArg(key='net.naming-scheme', value='rhel-8.10')], False), - ([KernelCmdlineArg(key='net.ifname', value='1')], True), - ([KernelCmdlineArg(key='net.ifname', value='0')], False), + ([KernelCmdlineArg(key='net.ifnames', value='1')], True), + ([KernelCmdlineArg(key='net.ifnames', value='0')], False), ( [ KernelCmdlineArg(key='net.naming-scheme', value='rhel-8.10'),