Skip to content

Commit

Permalink
nmcli: Add xmit_hash_policy to bond options. (#5149) (#5253)
Browse files Browse the repository at this point in the history
* Add xmit_hash_policy to nmcli bond-options.

* #5149 - Add changelog fragment.

* Update plugins/modules/net_tools/nmcli.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/5149-nmcli-bond-option.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Ole Pannbacker <opannbacker@cronon.net>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b4f89b7)

Co-authored-by: betuxy <72452886+betuxy@users.noreply.github.com>
  • Loading branch information
patchback[bot] and betuxy committed Sep 8, 2022
1 parent 8595601 commit 005db81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/5149-nmcli-bond-option.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- nmcli - add bond option ``xmit_hash_policy`` to bond options (https://github.com/ansible-collections/community.general/issues/5148).
8 changes: 8 additions & 0 deletions plugins/modules/net_tools/nmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,11 @@
description:
- This is only used with bond - updelay.
type: int
xmit_hash_policy:
description:
- This is only used with bond - xmit_hash_policy type.
type: str
version_added: 5.6.0
arp_interval:
description:
- This is only used with bond - ARP interval.
Expand Down Expand Up @@ -1440,6 +1445,7 @@ def __init__(self, module):
self.primary = module.params['primary']
self.downdelay = module.params['downdelay']
self.updelay = module.params['updelay']
self.xmit_hash_policy = module.params['xmit_hash_policy']
self.arp_interval = module.params['arp_interval']
self.arp_ip_target = module.params['arp_ip_target']
self.slavepriority = module.params['slavepriority']
Expand Down Expand Up @@ -1580,6 +1586,7 @@ def connection_options(self, detect_change=False):
'mode': self.mode,
'primary': self.primary,
'updelay': self.updelay,
'xmit_hash_policy': self.xmit_hash_policy,
})
elif self.type == 'bond-slave':
options.update({
Expand Down Expand Up @@ -2227,6 +2234,7 @@ def main():
miimon=dict(type='int'),
downdelay=dict(type='int'),
updelay=dict(type='int'),
xmit_hash_policy=dict(type='str'),
arp_interval=dict(type='int'),
arp_ip_target=dict(type='str'),
primary=dict(type='str'),
Expand Down

0 comments on commit 005db81

Please sign in to comment.