-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Community Note
- 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
Ansible Version and collection version
ansible [core 2.16.3]
DCNM version
12.2.2
Affected module(s)
- dcnm_fabric
Ansible Playbook
# Copy-paste your anisble playbook here
Debug Output
TASK [cisco.nac_dc_vxlan.create : Manage Fabric VAC_MSD in NDFC] *************************************************************************************************************************
task path: /Users/mkilar/Desktop/Projects/Vxlan_as_Code/nac-ndfc/collections/ansible_collections/cisco/nac_dc_vxlan/roles/dtc/create/tasks/common/fabric.yml:45
<10.62.188.71> ESTABLISH LOCAL CONNECTION FOR USER: mkilar
<10.62.188.71> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_
"&& mkdir "echo /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532
" && echo ansible-tmp-1748592834.374045-91774-76285718423532="echo /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532
" ) && sleep 0'
Using module file /Users/mkilar/Desktop/Projects/Vxlan_as_Code/nac-ndfc/collections/ansible_collections/cisco/dcnm/plugins/modules/dcnm_fabric.py
<10.62.188.71> PUT /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/tmpq3c1we26 TO /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532/AnsiballZ_dcnm_fabric.py
<10.62.188.71> EXEC /bin/sh -c 'chmod u+x /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532/ /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532/AnsiballZ_dcnm_fabric.py && sleep 0'
<10.62.188.71> EXEC /bin/sh -c '/Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532/AnsiballZ_dcnm_fabric.py && sleep 0'
<10.62.188.71> EXEC /bin/sh -c 'rm -f -r /Users/mkilar/.ansible/tmp/ansible-local-90471y4a4gcj_/ansible-tmp-1748592834.374045-91774-76285718423532/ > /dev/null 2>&1 && sleep 0'
fatal: [VAC_MSD]: FAILED! => {
"changed": false,
"diff": [
{
"sequence_number": 1
}
],
"invocation": {
"module_args": {
"config": [
{
"ANYCAST_GW_MAC": "20:20:00:00:00:aa",
"BGW_ROUTING_TAG": 54321,
"BORDER_GWY_CONNECTIONS": "Direct_To_BGWS",
"DELAY_RESTORE": 300,
"DEPLOY": false,
"FABRIC_NAME": "VAC_MSD",
"FABRIC_TYPE": "VXLAN_EVPN_MSD",
"L2_SEGMENT_ID_RANGE": "30000-49000",
"L3_PARTITION_ID_RANGE": "50000-59000",
"LOOPBACK100_IPV6_RANGE": "fd00::a10:0/120",
"MS_IFC_BGP_PASSWORD_ENABLE": false,
"MS_LOOPBACK_ID": 100,
"MS_UNDERLAY_AUTOCONFIG": true,
"TOR_AUTO_DEPLOY": false,
"V6_DCI_SUBNET_RANGE": "fd00::a11:0/120",
"V6_DCI_SUBNET_TARGET_MASK": 126,
"VXLAN_UNDERLAY_IS_V6": true
}
],
"skip_validation": false,
"state": "merged"
}
},
"metadata": [
{
"action": "fabric_create",
"check_mode": false,
"sequence_number": 1,
"state": "merged"
}
],
"msg": "Module failed.",
"response": [
{
"DATA": "Invalid JSON response: Failed to create the fabric, due to invalid fields [{VXLAN_UNDERLAY_IS_V6=true}], please provide valid fields [{VXLAN_UNDERLAY_IS_V6=}] for fabric-settings",
"MESSAGE": "Internal Server Error",
"METHOD": "POST",
"REQUEST_PATH": "https://10.62.188.71:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/VAC_MSD/MSD_Fabric",
"RETURN_CODE": 500,
"sequence_number": 1
}
],
"result": [
{
"changed": false,
"sequence_number": 1,
"success": false
}
]
}
Expected Behavior
Actual Behavior
In order to create the fabric the dcnm_fabric seem to perform a POST to the following path:
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/{fabricName}/{templateName}
- this includes the fabric name and template already in the path, payload just specifies the fabric parameters
- that's exactly the path documented under the NDFC apidocs
yet this doesn't seem to support all of the parameters available at the GUI level.
When creating the fabric using GUI (inspected with Developer Tools) few differences become evident
-
the GUI uses slightly different path (without fabric/template in the path)
/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics -
the fabric name and template are part of the payload
-
within the nvPairs we see:
FABRIC_TYPE: "MFD"
FF: "MSD"
"MFD" is not documented
The difference in behavior are visible eg when we try creating an MSD fabric with "Enable IPv6 Underlay for VXLAN Fabric" checkbox selected.
When using dcnm_fabric module to create MSD fabric and specifying "VXLAN_UNDERLAY_IS_V6 = true" a following error is observed
"response": [{"DATA": "Invalid JSON response: Failed to create the fabric, due to invalid fields [{VXLAN_UNDERLAY_IS_V6=true}], please provide valid fields [{VXLAN_UNDERLAY_IS_V6=}] for fabric-settings", "MESSAGE": "Internal Server Error", "METHOD": "POST", "REQUEST_PATH": "https://10.62.188.71:443/appcenter/cisco/ndfc/api/v1/lan-fabric/rest/control/fabrics/VAC_MSD/MSD_Fabric", "RETURN_CODE": 500