Pure-Storage-Ansible / FlashArray-Collection

Ansible Collection for Pure Storage FlashArray
GNU General Public License v3.0
19 stars 21 forks source link

network port reports as changed when removing the address or gateway #473

Closed tylergmuir closed 9 months ago

tylergmuir commented 9 months ago

Describe the bug When using purefa_network, if you have address set to 0.0.0.0/0 or gateway set to 0.0.0.0 to remove either of those configurations from the network on the array, it always reports back changed regardless of if anything was changed.

To Reproduce Steps to reproduce the behavior:

  1. Have a network port without an IP address or gateway configured.
  2. Use the purefa_network module with state: present, address: 0.0.0.0/0, and gateway: 0.0.0.0.

Expected behavior The expected behavior is that if nothing on the port is changed, the status should report ok instead of changed.

tylergmuir commented 9 months ago

@sdodsley I noticed this issue a few days ago. I think it should be a pretty easy fix to just check for 0.0.0.0/0 or 0.0.0.0 and see if the existing state is None on the two options. It could be rolled into #471 if you wanted or it can be done separately but I was going to hold off on submitting a PR for this since you already have one inflight for that module.

sdodsley commented 9 months ago

@tylergmuir I'll roll it into the work I'm doing for VIF and LACP

sdodsley commented 9 months ago

@tylergmuir addressed in #474

tylergmuir commented 9 months ago

@sdodsley It looks like it is reporting right now with the update you made to #474