Skip to content

Get nmconnection name by interface-name first#409

Open
Cristi1324 wants to merge 1 commit intocloudbase:masterfrom
Cristi1324:fix-nmconnection-name
Open

Get nmconnection name by interface-name first#409
Cristi1324 wants to merge 1 commit intocloudbase:masterfrom
Cristi1324:fix-nmconnection-name

Conversation

@Cristi1324
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread coriolis/osmorphing/netpreserver/nmconnection.py
@Cristi1324 Cristi1324 force-pushed the fix-nmconnection-name branch from 39ad1c9 to fb3a67e Compare April 15, 2026 11:20
"mac_address": None,
"ip_addresses": ["192.168.1.40"]
},
"System ethx": {
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.

We shouldn't support any spaces as the interface name, as this value will go straight into the udev rules. Please fix this in the code.

@Cristi1324 Cristi1324 force-pushed the fix-nmconnection-name branch from fb3a67e to ac7902e Compare April 15, 2026 11:57
if not name:
name = re.match(r"^.*/(.*)\.nmconnection$",
nmconn_file).groups()[0]
if not name or " " in name:
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.

This isn't exactly what I meant :)
I meant something in the lines of:

name.replace(' ', '_')

@Cristi1324 Cristi1324 force-pushed the fix-nmconnection-name branch from ac7902e to 22bf731 Compare April 15, 2026 16:09
@Cristi1324 Cristi1324 force-pushed the fix-nmconnection-name branch from 22bf731 to 232fe9e Compare April 15, 2026 16:17
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