@@ -259,7 +259,7 @@ def main():
259
259
object_description = "Node Profile"
260
260
path = "/fabricResourceTemplate/template/nodeProfiles"
261
261
node_profile_path = None
262
- reference_dict = {
262
+ reference_collection = {
263
263
"policy" : {
264
264
"name" : "policyName" ,
265
265
"reference" : "policy" ,
@@ -279,10 +279,12 @@ def main():
279
279
)
280
280
if match :
281
281
node_profile_path = "{0}/{1}" .format (path , match .index )
282
- mso_template .update_config_with_template_and_references (match .details , reference_dict )
282
+ mso_template .update_config_with_template_and_references (match .details , reference_collection )
283
283
mso .existing = mso .previous = copy .deepcopy (match .details )
284
284
else :
285
- mso .existing = mso .previous = [mso_template .update_config_with_template_and_references (profile , reference_dict ) for profile in existing_node_profiles ]
285
+ mso .existing = mso .previous = [
286
+ mso_template .update_config_with_template_and_references (profile , reference_collection ) for profile in existing_node_profiles
287
+ ]
286
288
287
289
if state == "present" :
288
290
if uuid and not mso .existing :
@@ -321,12 +323,12 @@ def main():
321
323
[KVPair ("uuid" , uuid ) if uuid else KVPair ("name" , name )],
322
324
)
323
325
if match :
324
- mso_template .update_config_with_template_and_references (match .details , reference_dict )
326
+ mso_template .update_config_with_template_and_references (match .details , reference_collection )
325
327
mso .existing = match .details # When the state is present
326
328
else :
327
329
mso .existing = {} # When the state is absent
328
330
elif module .check_mode and state != "query" : # When the state is present/absent with check mode
329
- mso_template .update_config_with_template_and_references (mso .proposed , reference_dict )
331
+ mso_template .update_config_with_template_and_references (mso .proposed , reference_collection )
330
332
mso .existing = mso .proposed if state == "present" else {}
331
333
332
334
mso .exit_json ()
0 commit comments