|
2574 | 2574 | - debug:
|
2575 | 2575 | var: result
|
2576 | 2576 |
|
| 2577 | +# Setting skip_validation to True to bypass parameter validation in the module. |
| 2578 | +# Note, this does not bypass parameter validation in NDFC. skip_validation |
| 2579 | +# can be useful to verify that the dcnm_fabric module's parameter validation |
| 2580 | +# is disallowing parameter combinations that would also be disallowed by |
| 2581 | +# NDFC. |
| 2582 | +
|
| 2583 | +- name: Update fabrics |
| 2584 | + cisco.dcnm.dcnm_fabric: |
| 2585 | + state: merged |
| 2586 | + skip_validation: True |
| 2587 | + config: |
| 2588 | + - FABRIC_NAME: VXLAN_Fabric |
| 2589 | + FABRIC_TYPE: VXLAN_EVPN |
| 2590 | + BGP_AS: 65000 |
| 2591 | + ANYCAST_GW_MAC: 0001.aabb.ccdd |
| 2592 | + UNDERLAY_IS_V6: false |
| 2593 | + EXTRA_CONF_LEAF: | |
| 2594 | + interface Ethernet1/1-16 |
| 2595 | + description managed by NDFC |
| 2596 | + DEPLOY: false |
| 2597 | +
|
2577 | 2598 | # Use replaced state to return the fabrics to their default configurations.
|
2578 | 2599 |
|
2579 | 2600 | - name: Return fabrics to default configuration.
|
|
2620 | 2641 | - debug:
|
2621 | 2642 | var: result
|
2622 | 2643 |
|
| 2644 | +# When skip_validation is False (the default), some error messages might be |
| 2645 | +# misleading. For example, with the playbook below, the error message |
| 2646 | +# that follows should be interpreted as "ENABLE_PVLAN is mutually-exclusive |
| 2647 | +# to ENABLE_SGT and should be removed from the playbook if ENABLE_SGT is set |
| 2648 | +# to True." In the NDFC GUI, if Security Groups is enabled, NDFC disables |
| 2649 | +# the ability to modify the PVLAN option. Hence, even a valid value for |
| 2650 | +# ENABLE_PVLAN in the playbook will generate an error. |
| 2651 | +
|
| 2652 | +```bash |
| 2653 | +fatal: [ndfc1]: FAILED! => {"changed": false, "msg": "The following parameter(value) combination(s) are invalid and need to be reviewed: Fabric: f3, ENABLE_PVLAN(False) requires ENABLE_SGT != True. ENABLE_SGT valid values: [False, True]. ", "response": [{}], "result": [{}]} |
| 2654 | +``` |
| 2655 | +
|
| 2656 | +```yaml |
| 2657 | + - name: merged fabrics (dcnm_send) |
| 2658 | + cisco.dcnm.dcnm_fabric: |
| 2659 | + state: merged |
| 2660 | + skip_validation: false |
| 2661 | + config: |
| 2662 | + - FABRIC_NAME: MyFabric |
| 2663 | + FABRIC_TYPE: VXLAN_EVPN |
| 2664 | + BGP_AS: 65001 |
| 2665 | + ENABLE_SGT: true |
| 2666 | + ENABLE_PVLAN: false |
| 2667 | +``` |
| 2668 | +
|
2623 | 2669 | """
|
2624 | 2670 | # pylint: disable=wrong-import-position
|
2625 | 2671 | import copy
|
|
0 commit comments