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>
This commit is contained in:
Sergey Putko 2023-05-21 18:03:38 +03:00 committed by GitHub
parent d643bd5794
commit cb1e6376db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -2119,6 +2119,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)