mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
infiniband and bond interfaces can receive MTU settings too (#7499)
* infiniband and bond interfaces can receive MTU settings too * adding test for default mtu setting * the mtu parameter for infiniband is different than for ethernet * adding changelog fragment * Update changelogs/fragments/7499-allow-mtu-setting-on-bond-and-infiniband-interfaces.yml Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
df66885fa4
commit
d0870a022e
3 changed files with 10 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- nmcli - allow for the setting of ``MTU`` for ``infiniband`` and ``bond`` interface types (https://github.com/ansible-collections/community.general/pull/7499).
|
|
@ -1950,15 +1950,20 @@ class Nmcli(object):
|
|||
@property
|
||||
def mtu_conn_type(self):
|
||||
return self.type in (
|
||||
'bond',
|
||||
'dummy',
|
||||
'ethernet',
|
||||
'infiniband',
|
||||
'team-slave',
|
||||
'vlan',
|
||||
)
|
||||
|
||||
@property
|
||||
def mtu_setting(self):
|
||||
return '802-3-ethernet.mtu'
|
||||
if self.type == 'infiniband':
|
||||
return 'infiniband.mtu'
|
||||
else:
|
||||
return '802-3-ethernet.mtu'
|
||||
|
||||
@staticmethod
|
||||
def mtu_to_string(mtu):
|
||||
|
|
|
@ -1445,7 +1445,8 @@ ipv4.may-fail: yes
|
|||
ipv6.method: auto
|
||||
ipv6.ignore-auto-dns: no
|
||||
ipv6.ignore-auto-routes: no
|
||||
infiniband.transport-mode datagram
|
||||
infiniband.mtu: auto
|
||||
infiniband.transport-mode: datagram
|
||||
"""
|
||||
|
||||
TESTCASE_INFINIBAND_STATIC_MODIFY_TRANSPORT_MODE = [
|
||||
|
|
Loading…
Reference in a new issue