community.general
community.general copied to clipboard
Add transport_mode configuration for Infiniband devices
SUMMARY
Adds transport_mode configuration for Infiniband based IPoIB devices, which is one of:
- datagram (default)
- connected
Fixes #5356
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
nmcli.py
ADDITIONAL INFORMATION
For Infiniband IPoIB devices like ib0 there are two different transport modes that can be chosen.
- datagram
- connected
# nmcli -t con show ib0 | grep infiniband.transport-mode
infiniband.transport-mode:datagram
# grep -H . /sys/class/net/ib0/{mtu,mode}
/sys/class/net/ib0/mtu:2044
/sys/class/net/ib0/mode:datagram
# nmcli -t con show ib0 | grep infiniband.transport-mode
infiniband.transport-mode:connected
# grep -H . /sys/class/net/ib0/{mtu,mode}
/sys/class/net/ib0/mtu:65520
/sys/class/net/ib0/mode:connected
cc @alcamie101 click here for bot help
The test ansible-test sanity --test pep8 [explain] failed with 2 errors:
plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 2 errors:
plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 2 errors:
plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 2 errors:
plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace
The test ansible-test sanity --test pep8 [explain] failed with 2 errors:
plugins/modules/net_tools/nmcli.py:70:20: W291: trailing whitespace
plugins/modules/net_tools/nmcli.py:72:80: W291: trailing whitespace
Docs Build 📝
Thank you for contribution!✨
This PR has been merged and your docs changes will be incorporated when they are next published.
It would be great if you could extend the tests in tests/unit/plugins/modules/net_tools/test_nmcli.py to cover this new option.
It would be great if you could extend the tests in tests/unit/plugins/modules/net_tools/test_nmcli.py to cover this new option.
@felixfontein: not sure if I did the correct things while adding the tests. I tried to copy the ethernet test. At least the local ansible-test did succeed for me.
Backport to stable-5: 💚 backport PR created
✅ Backport PR branch: patchback/backports/stable-5/b54483b52eecaa2c6c5446f1d13f73f6d95d409e/pr-5361
Backported as https://github.com/ansible-collections/community.general/pull/5408
🤖 @patchback I'm built with octomachinery and my source is open — https://github.com/sanitizers/patchback-github-app.
@ThomasGebert thanks for your contribution! @russoz thanks for reviewing!