Closed eduardomozart closed 2 months ago
Hello guys, I did some changes on the script to handle cenarios where there's some sort of VIP (virtual IP, used for redundancy on network devices). On my infrastructure, we have an Aruba Instant Access Points (IAP) cluster (a virtual controller that handle all APs on our site), as you can see below, both devices contains "192.168.0.6", which is a VIP that I use to manage the IAP cluster (only one device assume this IP at the time, and if this AP is down, other devices assume this VIP, so the cluster management is always available), but each AP has it's own AP:
So this virtual IP (192.168.0.6) is on the same range than my task (192.168.0.0/24), but it will be used only if there's no other unique IP available on the same network range.
This would need tests
Please fix CS
This would need tests
I'll see what I can do.
Please fix CS
Which line(s)?
Please fix CS Which line(s)?
See GH actions output: https://github.com/glpi-project/glpi-inventory-plugin/actions/runs/9891523512/job/28031989775?pr=524
Hello, I added the Unit Tests as requested by trasher but as cedric already approved those changes and the changes I made after his approval was minimal (only continued loop if IP wasn't unique instead of breaking it), I believe it should work as expected. The changes I made after cedric approval may not be needed (at least, for Aruba IAP cluster Virtual IPs) if #536 be investigated further, but maybe other systems of redundancy can also assign an VIP for more than one device, so this kind of check maybe useful to keep.
Fix https://github.com/glpi-project/glpi-inventory-plugin/issues/523