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_network requires ports attribute when attaching to switch #80

Open
gve-vse-tim opened this issue Jul 10, 2021 · 2 comments
Open

dcnm_network requires ports attribute when attaching to switch #80

gve-vse-tim opened this issue Jul 10, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@gve-vse-tim
Copy link

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 2.10.5
DCNM Collection 1.1.1

DCNM version

  • V 11.5.1

Affected module(s)

  • dcnm_network

Ansible Playbook

    - name: Create a Network and Attach to Switches
      dcnm_network:
        fabric: multisite_domain_fabric
        state: replaced
        config:
          - net_name: VLAN10
            vrf_name: VXLAN_OVERLAY
            vlan_id: 10
            gw_ip_subnet: '192.168.10.1/24'
            net_id: 30000
            deploy: true
            attach:
              - ip_address: 10.60.66.131

Debug Output

TASK [Create a Network and Attach to Switches]
*******************************************************************
fatal: [dcpod_dcnm]: FAILED! => {"changed": false, "msg": "Invalid parameters in playbook: ports : Required parameter not found"}

Expected Behavior

The VLAN (and SVI) should be configured on the switch specified without any errors and without the requirement to assign it to a port.

Actual Behavior

The DCNM module has specified that ports is a mandatory attribute for attaching the network to a switch. This behavior does not match the DCNM GUI behavior.

It's also a case of DRY (don't repeat yourself) in that you have to define allowed VLANs on trunk or access VLANs when configuring portchannel, VPC, or other trunk interfaces. So, customers (and myself) prefer defining VLAN members on the actual interfaces and not on the networks.

@praveenramoorthy
Copy link
Collaborator

praveenramoorthy commented Jul 13, 2021

@gve-vse-tim Thanks for raising this SR. Port is a mandatory attribute, but you can have an empty list for that attribute.

    - name: Create a Network and Attach to Switches
      dcnm_network:
        fabric: multisite_domain_fabric
        state: replaced
        config:
          - net_name: VLAN10
            vrf_name: VXLAN_OVERLAY
            vlan_id: 10
            gw_ip_subnet: '192.168.10.1/24'
            net_id: 30000
            deploy: true
            attach:
              - ip_address: 10.60.66.131
                ports: []

This should help.

@mikewiebe
Copy link
Collaborator

@gve-vse-tim As @praveenramoorthy suggested you can leave the ports: setting empty but we will make a change to the module so that the ports: setting is NOT mandatory.

@mikewiebe mikewiebe added the enhancement New feature or request label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants