#Can you rename a broadcast domain without specifying the member ports?

1 messages · Page 1 of 1 (latest)

errant marlin
#

Using the na_ontap_broadcast_domain module, is it possible to rename a broadcast domain without having to specify all the ports that are members of it? I am trying to run the play below, and it is giving me the error message that follows.

Or, is there an easy way to populate the ports parameter with the member ports? If I loop through the output of a na_ontap_rest_info, it only gives me one port at a time, instead of all the ports that are in the broadcast domain.


  • name: Rename Broadcast Domain
    na_ontap_broadcast_domain:
    hostname: "{{ inventory_hostname_short }}"
    username: "{{ netapp_username }}"
    password: "{{ netapp_password }}"
    validate_certs: false
    https: true
    state: present
    mtu: 1500 | int
    ipspace: Default
    from_name: Default
    name: "{{ cluster_mgmt_port }}_bd"

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: netapp_lib.api.zapi.zapi.NaApiError: NetApp API failed. Reason - 13006:Missing input: ports fatal: [cluster01]: FAILED! => {"changed": false, "msg": "Error splitting broadcast domain e0M_bd: NetApp API failed. Reason - 13006:Missing input: ports"}

wild patrol
#

I don't know if the module is designed to rename a broadcast domain. As an alternative you can go with rest_cli module. Like

  delegate_to: localhost
  netapp.ontap.na_ontap_rest_cli:
    hostname: "{{ ontap_cluster }}"
    username: "{{ ontap_user }}"
   password: "{{ ontap_pw }}"
    https: true
    validate_certs: false
    command: network/port/broadcast-domain/rename
    verb: PATCH
    params:
      broadcast-domain: 'old-name'
    body:
      new-name: 'new-name'```
lofty cedar
lofty cedar
#

I think REST allows rename without specifying ports.

#

rename here means creating a new port and moving all the ports to new broadcast domain.

errant marlin
#

Unfortunately, specifying “use_rest: Always” still gives the same message that it is missing input: ports.
I’m sure I can do it with na_ontap_rest_cli, but I was trying to avoid using that as much as possible.