mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 10:21:25 -07:00
Remove nmcli modify dependency on type parameter (#4108)
* 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>
This commit is contained in:
parent
d4e92fc720
commit
1ca7894d30
3 changed files with 135 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue