fix int options idempotence bug and add new test to check it (#5443)

This commit is contained in:
Alex Groshev 2022-11-01 21:40:17 +01:00 committed by GitHub
parent f84a9bf932
commit dc66aefa40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 186 additions and 1 deletions

View file

@ -2135,7 +2135,8 @@ class Nmcli(object):
elif all([key == self.mtu_setting, self.type == 'dummy', current_value is None, value == 'auto', self.mtu is None]):
value = None
else:
if current_value != to_text(value):
value = to_text(value)
if current_value != value:
changed = True
diff_before[key] = current_value