From b54483b52eecaa2c6c5446f1d13f73f6d95d409e Mon Sep 17 00:00:00 2001 From: ThomasGebert <44234595+ThomasGebert@users.noreply.github.com> Date: Sun, 23 Oct 2022 11:30:48 +0200 Subject: [PATCH] nmcli: add transport_mode configuration for Infiniband devices (#5361) * Adds transport_mode configuration for Infiniband devices Adds transport_mode configuration for Infiniband based ipoib devices, which is one of: - datagram (default) - connected * Remove trailing whitespace * Add changelog fragment * Update changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Update plugins/modules/net_tools/nmcli.py Co-authored-by: Felix Fontein * Remove default for transport_mode * Add test for changing Infiniband transport_mode * remove blank line at end of file Co-authored-by: Thomas Gebert Co-authored-by: Felix Fontein --- ...1-nmcli-add-infiniband-transport-mode.yaml | 2 + plugins/modules/net_tools/nmcli.py | 13 ++ .../plugins/modules/net_tools/test_nmcli.py | 114 ++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml diff --git a/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml b/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml new file mode 100644 index 0000000000..370d124663 --- /dev/null +++ b/changelogs/fragments/5361-nmcli-add-infiniband-transport-mode.yaml @@ -0,0 +1,2 @@ +minor_changes: + - "nmcli - add ``transport_mode`` configuration for Infiniband devices (https://github.com/ansible-collections/community.general/pull/5361)." diff --git a/plugins/modules/net_tools/nmcli.py b/plugins/modules/net_tools/nmcli.py index 13adc8bbd2..49565b9122 100644 --- a/plugins/modules/net_tools/nmcli.py +++ b/plugins/modules/net_tools/nmcli.py @@ -67,6 +67,12 @@ options: type: str choices: [ 802.3ad, active-backup, balance-alb, balance-rr, balance-tlb, balance-xor, broadcast ] default: balance-rr + transport_mode: + description: + - This option sets the connection type of Infiniband IPoIB devices. + type: str + choices: [ datagram, connected ] + version_added: 5.8.0 master: description: - Master