Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dcnm_fabric: External fabric types should add EXT_FABRIC_TYPE to the POST request payload. #343

Closed
allenrobel opened this issue Nov 15, 2024 · 0 comments · Fixed by #344
Closed
Assignees
Labels
bug Something isn't working

Comments

@allenrobel
Copy link
Collaborator

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

Acknowledgement

Thank you to Alessandro De Prato for bringing this issue to our attention.

Ansible Version and collection version

ansible [core 2.16.4]
  config file = /Users/arobel/.ansible.cfg
  configured module search path = ['/Users/arobel/repos/ansible_dev/dcnm_fabric/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/arobel/py312/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/arobel/repos/ansible_dev/dcnm_fabric
  executable location = /Users/arobel/py312/bin/ansible
  python version = 3.12.0 (v3.12.0:0fb18b02c8, Oct  2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)] (/Users/arobel/py312/bin/python3.12)
  jinja version = 3.1.3
  libyaml = True

DCNM version

  • V 3.6.0

Affected module(s)

  • dcnm_fabric

Ansible Playbook

- name: dcnm_fabric_test
  hosts: ndfc
  tasks:
    -   name: merge ISN fabric
        cisco.dcnm.dcnm_fabric:
            state: merged
            config:
             -   FABRIC_NAME: ISN
                 BGP_AS: 65022
                 FABRIC_TYPE: ISN

Debug Output

Expected Behavior

After merging the above fabric, the Fabric Type column in the NDFC GUI (NDFC -> Manage -> Fabrics) should display "Multi-Site External Network".

Actual Behavior

After merging the above fabric, the Fabric Type column in the NDFC GUI (NDFC -> Manage -> Fabrics) displays "Custom Fabric".

Steps to Reproduce

Run the provided playbook.

Workaround

Until a fix is integrated, the following modification to the playbook will nudge NDFC to display a proper label for ISN fabric type. The EXT_FABRIC_TYPE key is used only for fabrics that use the External_Fabric template.

- name: dcnm_fabric_test
  hosts: ndfc
  tasks:
    -   name: merge ISN fabric
        cisco.dcnm.dcnm_fabric:
            state: merged
            config:
             -   FABRIC_NAME: ISN
                 BGP_AS: 65022
                 EXT_FABRIC_TYPE: "Multi-Site External Network"
                 FABRIC_TYPE: ISN

References

allenrobel added a commit that referenced this issue Nov 15, 2024
1. module_utils/fabric/create.py

Modify the payload for external fabric types to include EXT_FABRIC_TYPE key with value being the default value that the NDFC GUI uses to display the fabric type.

2. module_utils/fabric/fabric_types.py

Add a mapping between external fabric types and the string NDFC uses when  displaying the fabric type.
@allenrobel allenrobel self-assigned this Nov 16, 2024
@allenrobel allenrobel added the bug Something isn't working label Nov 16, 2024
@allenrobel allenrobel linked a pull request Nov 16, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant