Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Root case analysis is complete. Debug output not needed.
Expected Behavior
While some errors are appropriate for the above parameters, others are not. In particular, the following behaviors are expected (based on GUI behavior):
GUI behavior
If UNDERLAY_IS_V6 is enabled, ENABLE_SGT is disabled (greyed out)
If ENABLE_PVLAN is enabled, ENABLE_SGT is disabled (greyed out)
If ENABLE_SGT is enabled, ENABLE_PVLAN is disabled (greyed out)
PLAYBOOK implications
Per GUI.1
UNDERLAY_IS_V6 must be True (or commented out) to configure ENABLE_SGT
Per GUI.2
ENABLE_PVLAN must be False (or commented out) to configure ENABLE_SGT
Per GUI.3
ENABLE_SGT must be False (or commented out) to configure ENABLE_PVLAN
Per GUI.3 and GUI.4
ENABLE_PVLAN and ENABLE_SGT are mutually-exclusive so cannot both be in a playbook.
NOTES
Depending on the current state on the controller (e.g. if the fabric exists and merged state is used in the playbook) the controller value may play a part. However, the playbook value always takes precedence over the controller value.
Precedence during parameter verification
Playbook takes precedence over controller
Controller takes precedence over template default value
Template default value is considered only when the parameter is not in the playbook and the fabric does not exist.
Actual Behavior
Errors are experienced for some valid combinations of parameters.
Root cause analysis
There were a couple issues with the existing code.
A conditional was evaluating a (potential None) value as if not <value> when it should have been if <value> is False
If checks for all sources for the parameter value (playbook, controller, template default) return None (i.e. the parameter should not be considered when validating the dependent parameter), then we now set the decision_set to {True} (meaning "accept" the parameter as valid).
Community Note
Ansible Version and collection version
DCNM version
Affected module(s)
Ansible Playbook
Certain combinations of
ENABLE_SGT
,ENABLE_PVLAN
, andUNDERLAY_IS_V6
result (inappropriately) in errors.Very likely this impacts other parameters not mentioned above.
Debug Output
Root case analysis is complete. Debug output not needed.
Expected Behavior
While some errors are appropriate for the above parameters, others are not. In particular, the following behaviors are expected (based on GUI behavior):
GUI behavior
UNDERLAY_IS_V6
is enabled,ENABLE_SGT
is disabled (greyed out)ENABLE_PVLAN
is enabled,ENABLE_SGT
is disabled (greyed out)ENABLE_SGT
is enabled,ENABLE_PVLAN
is disabled (greyed out)PLAYBOOK implications
UNDERLAY_IS_V6
must be True (or commented out) to configure ENABLE_SGTENABLE_PVLAN
must be False (or commented out) to configure ENABLE_SGTENABLE_SGT
must be False (or commented out) to configure ENABLE_PVLANENABLE_PVLAN
andENABLE_SGT
are mutually-exclusive so cannot both be in a playbook.NOTES
Actual Behavior
Errors are experienced for some valid combinations of parameters.
Root cause analysis
There were a couple issues with the existing code.
A conditional was evaluating a (potential None) value as
if not <value>
when it should have beenif <value> is False
If checks for all sources for the parameter value (playbook, controller, template default) return None (i.e. the parameter should not be considered when validating the dependent parameter), then we now set the decision_set to {True} (meaning "accept" the parameter as valid).
References
PR #335