From c003a8fa14bdcdd3390f35cae53a76a881f27e13 Mon Sep 17 00:00:00 2001 From: Julian Dannenberg Date: Tue, 27 Feb 2024 11:35:13 +0100 Subject: [PATCH] fix: #490 - nsxt_uplink_profiles check for uplinks key when diffing uplink profile Signed-off-by: Julian Dannenberg --- plugins/modules/nsxt_uplink_profiles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/modules/nsxt_uplink_profiles.py b/plugins/modules/nsxt_uplink_profiles.py index e82cec42..30dde013 100644 --- a/plugins/modules/nsxt_uplink_profiles.py +++ b/plugins/modules/nsxt_uplink_profiles.py @@ -240,7 +240,9 @@ def check_for_update(module, manager_url, mgr_username, mgr_password, validate_c both_lags_same = True for i in range(len(sorted_existing_lags)): diff_obj = {k: sorted_existing_lags[i][k] for k in sorted_existing_lags[i] if k in sorted_new_lags[i] and sorted_existing_lags[i][k] != sorted_new_lags[i][k]} - del diff_obj['uplinks'] + uplinks = diff_obj.get('uplinks', None) + if uplinks: + del diff_obj['uplinks'] if not cmp_dict(diff_obj, sorted_new_lags[i]): both_lags_same = False if not both_lags_same: