cnaas-nms icon indicating copy to clipboard operation
cnaas-nms copied to clipboard

Add `infra_ipv6` attribute to devices

Open lunkwill42 opened this issue 1 year ago • 5 comments

This PR fixes #276.

I could not find any existing tests that explicitly test the existing infra_ip attribute, so I'm not sure what the best strategy for testing this would be.

The existing code assigns values to Device.infra_ip when init-ing fabric devices, using the cnaas_nms.devicehandler.underlay.find_free_infra_ip() function: https://github.com/SUNET/cnaas-nms/blob/fada0774b9ba96f127f84f732a9ecaa04195326b/src/cnaas_nms/devicehandler/init_device.py#L724

Question: Should this PR concern itself with also assigning an IPv6 address to infra_ipv6? It seems the assignment is based on the infra_lo_net setting, so this may actually also need a new setting for infra_ipv6_lo_net. Setting the value could be made dependent on infra_ipv6_lo_net actually being present (i.e. "do nothing if IPv6 isn't used/configured")

This PR is dependent on #266 being merged first (actual changes start from ce1d4c38e5e6a156748ee23e3965f9234a7902e1)

lunkwill42 avatar Mar 31 '23 12:03 lunkwill42