ansible-dcnm icon indicating copy to clipboard operation
ansible-dcnm copied to clipboard

Adding a dhcp server in dcnm_network requires VRF, not mandatory on GUI, requirement needs to be removed

Open shaphill opened this issue 6 months ago • 3 comments

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

  • V 3.9.0

Affected module(s)

  • dcnm_network

Ansible Playbook

    - name: Add networks
      cisco.dcnm.dcnm_network:
        fabric: tme-dc5
        config:
          - net_name: Test-Network-1
            vrf_name: Hosts
            gw_ip_subnet: "192.168.1.1/24"
            vlan_id: 301
            dhcp_srvr1_ip: 10.10.10.10
            attach:
              - ip_address: 10.16.246.212
                tor_ports:
                  - ip_address: 10.16.246.216
                    ports: [Ethernet1/1]
                  - ip_address: 10.16.246.217
                    ports: [Ethernet1/1]
              - ip_address: 10.16.246.213
                tor_ports:
                  - ip_address: 10.16.246.216
                    ports: [Ethernet1/1]
                  - ip_address: 10.16.246.217
                    ports: [Ethernet1/1]
        state: merged
# ansible-playbook -i inventory.ini playbook.yaml

Debug Output

https://gist.github.com/shaphill/31acbcb4808bf495964f3b43ec62894e

Expected Behavior

Module should add the DCHP server to the network even without supplying a VRF

Actual Behavior

Module fails as it requires a VRF to be added. This requirement isn't present on the GUI, needs to be removed from the module.

Steps to Reproduce

Add a dhcp_srvr1_ip address to the dcnm_network module and omit the dhcp_srvr1_vrf field.

References

shaphill avatar Oct 02 '25 22:10 shaphill

@allenrobel I can take this one

miguecor avatar Oct 10 '25 20:10 miguecor

@miguecor

Thank you Miguel!

allenrobel avatar Oct 12 '25 17:10 allenrobel

PR #533 has been submitted to fix this issue.

miguecor avatar Oct 26 '25 13:10 miguecor

@shaphill, could you give us more information about this request? Who is requesting this change?

miguecor avatar Nov 10 '25 16:11 miguecor

Hi @miguecor, this is a customer request, they need this functionality. Additionally, within the GUI there is no requirement for a DHCP server's VRF, so this restriction needs to be relaxed to match.

shaphill avatar Nov 13 '25 19:11 shaphill