Skip to content

Change set_dhcp option to create nmconnection files for Redhat 9+#444

Open
fabi200123 wants to merge 1 commit into
cloudbase:masterfrom
fabi200123:move-nmconnection-fix-to-core
Open

Change set_dhcp option to create nmconnection files for Redhat 9+#444
fabi200123 wants to merge 1 commit into
cloudbase:masterfrom
fabi200123:move-nmconnection-fix-to-core

Conversation

@fabi200123

Copy link
Copy Markdown
Contributor

Currently when the set_dhcp option is set to true, it creates ifcfg files for all redhat versions.
From Rhel8, we also require to have the NM_CONTROLLED=yes, since in this version there is support for nmconnection files.
From Rhel9, it has changed from ifcfg files to nmconnection files, thus this PR adds a template and creates nmconnection files for all distros that have minimum version 9.

Comment thread coriolis/osmorphing/redhat.py Outdated
@fabi200123 fabi200123 force-pushed the move-nmconnection-fix-to-core branch 2 times, most recently from dac4f26 to 8c5ce0f Compare June 3, 2026 09:38
Comment thread coriolis/osmorphing/redhat.py Outdated
@fabi200123 fabi200123 force-pushed the move-nmconnection-fix-to-core branch 3 times, most recently from 2014d68 to c4183b6 Compare June 22, 2026 09:08
Comment thread coriolis/osmorphing/netpreserver/ifcfg.py Outdated
self.network_scripts_path)
if ifcfg_files:
ifcfgs_ethernet = self._get_ifcfgs_by_type(
ifcfgs_ethernet = self.osmorphing_tool._get_ifcfgs_by_type(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a future improvement (in another PR), can you please make the netpreservers NOT read through the files twice? Maybe just re-use the object in the factory instead of the class, or return this collection of interface files instead of a bool value, and pass it down to parse_network.

Comment thread coriolis/osmorphing/netpreserver/nmconnection.py Outdated
Comment thread coriolis/osmorphing/redhat.py Outdated
Comment thread coriolis/osmorphing/redhat.py Outdated
Comment thread coriolis/osmorphing/redhat.py Outdated
@fabi200123 fabi200123 force-pushed the move-nmconnection-fix-to-core branch from c4183b6 to 6963f40 Compare June 25, 2026 09:51
Comment thread coriolis/osmorphing/redhat.py Outdated
Comment thread coriolis/osmorphing/redhat.py
Comment thread coriolis/osmorphing/redhat.py Outdated
Comment thread coriolis/osmorphing/redhat.py Outdated
Comment thread coriolis/tests/osmorphing/test_redhat.py
Comment thread coriolis/osmorphing/redhat.py Outdated
@fabi200123 fabi200123 force-pushed the move-nmconnection-fix-to-core branch 2 times, most recently from 5573f27 to cbdde8f Compare June 26, 2026 12:19
@fabi200123 fabi200123 force-pushed the move-nmconnection-fix-to-core branch from cbdde8f to 65ecb6c Compare June 26, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants