Fix to - nxos_lag_interfaces not idempotent (#67359)

* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Adding files for RM static_routes

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Fix to #67169

* corrected rebase spillover

* indentation errors fixed

* modified integration testcase
pull/67695/head
GomathiselviS 5 years ago committed by GitHub
parent f292f21d86
commit 3acd8f6f7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -149,8 +149,10 @@ class Lag_interfaces(ConfigBase):
commands = []
for h in have:
obj_in_want = search_obj_in_list(h['name'], want, 'name')
if h == obj_in_want:
continue
if obj_in_want:
diff = self.diff_list_of_dicts(h['members'], obj_in_want['members'])
if not diff:
continue
commands.extend(self.del_all_commands(h))
for w in want:
commands.extend(self.set_commands(w, have))
@ -196,6 +198,10 @@ class Lag_interfaces(ConfigBase):
h_item = search_obj_in_list(w_item['member'], have, key='member') or {}
delta = dict_diff(h_item, w_item)
if delta:
if h_item:
if 'mode' in delta.keys() and delta['mode'] == 'on' and 'mode' not in h_item.keys():
# mode = on will not be displayed in running-config
continue
if 'member' not in delta.keys():
delta['member'] = w_item['member']
diff.append(delta)

@ -27,6 +27,7 @@
members:
- member: "{{ test_int1 }}"
- member: "{{ test_int2 }}"
mode: yes
state: merged
register: result

Loading…
Cancel
Save