Skip to content

Get nmconnection name by interface-name first#409

Merged
Dany9966 merged 1 commit intocloudbase:masterfrom
Cristi1324:fix-nmconnection-name
Apr 16, 2026
Merged

Get nmconnection name by interface-name first#409
Dany9966 merged 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
@Dany9966 Dany9966 merged commit b7098ed into cloudbase:master Apr 16, 2026
4 checks passed
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