Change idempotency check to be single pass (#42087)

- Previously all data between both data structures was compared
- Results in situations where updates are done when not needed
- Changes to single pass so only data in payload is compared
This commit is contained in:
Kevin Breit 2018-07-02 21:20:36 -05:00 committed by Dag Wieers
parent 09fec5a482
commit 3ee3fc893d

View file

@ -130,14 +130,14 @@ class MerakiModule(object):
if not optional_ignore:
optional_ignore = ('')
for k, v in original.items():
try:
if k not in ignored_keys and k not in optional_ignore:
if v != proposed[k]:
is_changed = True
except KeyError:
if v != '':
is_changed = True
# for k, v in original.items():
# try:
# if k not in ignored_keys and k not in optional_ignore:
# if v != proposed[k]:
# is_changed = True
# except KeyError:
# if v != '':
# is_changed = True
for k, v in proposed.items():
try:
if k not in ignored_keys and k not in optional_ignore: