nmcli: fixed idempotency issue when config bridge connection (#6105)

* nmcli: fixed idempotency issue when config bridge connection

* Update changelog fragment.

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Sam Potekhin
2023-03-26 14:28:51 +07:00
committed by GitHub
parent 5ee687049f
commit 81b16a88ee
2 changed files with 6 additions and 0 deletions

View File

@@ -1629,6 +1629,10 @@ class Nmcli(object):
'bridge.priority': self.priority,
'bridge.stp': self.stp,
})
# priority make sense when stp enabed, otherwise nmcli keeps bridge-priority to 32768 regrdless of input.
# force ignoring to save idempotency
if self.stp:
options.update({'bridge.priority': self.priority})
elif self.type == 'team':
options.update({
'team.runner': self.runner,