CiscoDevNet / ansible-dcnm

Apache License 2.0
47 stars 37 forks source link

Fix for issue #305 (dcnm_fabric replaced state, implicit change handling) #306

Closed allenrobel closed 5 months ago

allenrobel commented 5 months ago

This fix addresses an issue Mike found with dcnm_fabric replaced state -> #305.

Changes include:

  1. FabricReplacedCommon().update_replaced_payload()

If the playbook value for a parameter is None (which is the case when the playbook config does not contain the parameter), then the only thing we need to ensure is that the controller value is set to the default value. If the default value is null, we change it to the empty string "" since NDFC throws a 500 error for null parameter values.

  1. Update unit tests to reflect the above change. The following test was modified. Specifically two cases where the playbook parameter value is None (PARAM_8 and PARAM_15).