Skip to content

Commit 19dd430

Browse files
committed
feat(net-naming-scheme): enable by default on CS 9to10
This was done for RHEL 9to10 in 91f37a3. Jira: RHEL-148291
1 parent 362613c commit 19dd430

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

repos/system_upgrade/common/actors/emit_net_naming_scheme/libraries/emit_net_naming.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from leapp.exceptions import StopActorExecutionError
2-
from leapp.libraries.common.config import get_env, get_target_distro_id, version
2+
from leapp.libraries.common.config import get_env, version
33
from leapp.libraries.stdlib import api
44
from leapp.models import (
55
KernelCmdline,
@@ -49,11 +49,9 @@ def is_net_scheme_compatible_with_current_cmdline():
4949
def emit_msgs_to_use_net_naming_schemes():
5050
is_feature_enabled = get_env('LEAPP_DISABLE_NET_NAMING_SCHEMES', '0') != '1'
5151

52-
is_net_naming_available = version.get_target_major_version() == "9" or (
53-
version.matches_target_version(">= 10.2")
54-
# TODO the net-naming-sysattrs pkg is not yet available on CS10, remove
55-
# this when it becomes
56-
and not get_target_distro_id() == "centos"
52+
is_net_naming_available = (
53+
version.get_target_major_version() == "9"
54+
or version.matches_target_version(">= 10.2")
5755
)
5856

5957
if not (is_feature_enabled and is_net_naming_available):

repos/system_upgrade/common/actors/emit_net_naming_scheme/tests/test_emit_net_naming_scheme.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,8 @@ def ensure_one_msg_of_type_produced(produced_messages, msg_type):
9595
pkg_name = emit_net_naming_lib.NET_NAMING_SYSATTRS_RPM_NAME[target_major]
9696
produced_messages = api.produce.model_instances
9797

98-
if (
99-
is_net_scheme_enabled
100-
# the package is available since 10.2
101-
and target_ver != "10.0"
102-
# TODO not yet available in CS 10, remove this when it is
103-
and not (target_distro == "centos" and target_major == "10")
104-
):
98+
# the package is available since 10.2
99+
if is_net_scheme_enabled and target_ver != "10.0":
105100
userspace_tasks = ensure_one_msg_of_type_produced(produced_messages, TargetUserSpaceUpgradeTasks)
106101
assert userspace_tasks.install_rpms == [pkg_name]
107102

0 commit comments

Comments
 (0)