From daad0a535b370d0a3f847526185c185aca2d9935 Mon Sep 17 00:00:00 2001 From: Fernando Fernandez Mancera Date: Thu, 2 Sep 2021 11:33:14 +0200 Subject: [PATCH] nm.connection: do not rename existing connections When an user is specifying a custom name for a connection and then use Nmstate to modify the interface, it will be renamed. That makes impossible to use other automation tools because it will require to use the uuid instead. Integration test case added. Ref: https://bugzilla.redhat.com/1998222 Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Gris Ge --- libnmstate/nm/connection.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libnmstate/nm/connection.py b/libnmstate/nm/connection.py index 5a79c6f..39eb2b5 100644 --- a/libnmstate/nm/connection.py +++ b/libnmstate/nm/connection.py @@ -98,9 +98,6 @@ class _ConnectionSetting: self._setting.props.master = controller self._setting.props.slave_type = port_type - def set_profile_name(self, con_name): - self._setting.props.id = con_name - @property def setting(self): return self._setting @@ -116,7 +113,6 @@ def create_new_nm_simple_conn(iface, nm_profile): con_setting = _ConnectionSetting() if nm_profile and not is_multiconnect_profile(nm_profile): con_setting.import_by_profile(nm_profile, iface.is_controller) - con_setting.set_profile_name(iface.name) else: con_setting.create( iface.name, iface.name, nm_iface_type, iface.is_controller -- 2.27.0