[PR #7499/d0870a02 backport][stable-8] infiniband and bond interfaces can receive MTU settings too (#7527)

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>
(cherry picked from commit d0870a022e)

Co-authored-by: mark-tomich <tomichms@nih.gov>
pull/7531/head
patchback[bot] 2023-11-15 22:13:22 +01:00 committed by GitHub
parent c1f9aeaac8
commit bf284a01cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -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).

View File

@ -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):

View File

@ -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 = [