[PR #6527/cb1e6376 backport][stable-6] nmcli: Fix bond option xmit_hash_policy (#6555)

nmcli: Fix bond option xmit_hash_policy (#6527)

* nmcli_bond_xmit_fix

* Create 6527-nmcli-bond-fix-xmit_hash_policy.yml

add changelog

* Update changelogs/fragments/6527-nmcli-bond-fix-xmit_hash_policy.yml

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

* unit tests extend

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit cb1e6376db)

Co-authored-by: Sergey Putko <mail@psvlan.com>
This commit is contained in:
patchback[bot] 2023-05-21 17:23:56 +02:00 committed by GitHub
parent fe7b151a26
commit dfb61b283d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -2046,6 +2046,9 @@ class Nmcli(object):
if key in self.SECRET_OPTIONS:
self.edit_commands += ['set %s %s' % (key, value)]
continue
if key == 'xmit_hash_policy':
cmd.extend(['+bond.options', 'xmit_hash_policy=%s' % value])
continue
cmd.extend([key, value])
return self.execute_command(cmd)