Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 6 additions & 1 deletion plugins/modules/nmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,15 +1950,20 @@ def mac_setting(self):
@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):
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/plugins/modules/test_nmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,8 @@
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 = [
Expand Down