Remove nmcli modify dependency on type parameter (#4108) (#4320)

* Remove nmcli modify dependency on type parameter

* Add fragment

* Add newline for lint

* Fixed linting for tests

* Fix fragment

* Move aliases to ip_conn_type function

* Remove connection_map

* Updated fragment

* Fixed fragment

Co-authored-by: Trey West <--local>
(cherry picked from commit 1ca7894d30)

Co-authored-by: Trey West <treywest45th@gmail.com>
This commit is contained in:
patchback[bot]
2022-03-06 09:26:37 +01:00
committed by GitHub
parent a0b22e4402
commit d4740ff387
3 changed files with 135 additions and 0 deletions

View File

@@ -1528,6 +1528,7 @@ class Nmcli(object):
'bridge',
'dummy',
'ethernet',
'802-3-ethernet',
'generic',
'gre',
'infiniband',
@@ -1536,6 +1537,7 @@ class Nmcli(object):
'team',
'vlan',
'wifi',
'802-11-wireless',
'gsm',
'wireguard',
)
@@ -1895,6 +1897,12 @@ class Nmcli(object):
options = {
'connection.interface-name': self.ifname,
}
if not self.type:
current_con_type = self.show_connection().get('connection.type')
if current_con_type:
self.type = current_con_type
options.update(self.connection_options(detect_change=True))
return self._compare_conn_params(self.show_connection(), options)