In SX mark floating IPs as deprecated in dual-stack

With the dual-stack feature the system now can have 2 floating IPs per
network. In non-SX systems the floating IPs are managed by SM, but not
in AIO-SX, this is done via puppet, and it requires to mark floating
addresses as deprecated.

This change can now export IPv4 and IPv6 addresses to the
"platform::network::addresses::address_config" variable

Test Plan
[PASS] install AIO-SX and check if floating IPs have the correct
       flags
[PASS] in the installation configure dual-stack and check if floating
       IPs have the correct flags

Story: 2011027
Task: 49887

Change-Id: I48d727a05ef46105f984848f24f21f087efc64e2
Signed-off-by: Andre Kantek <andrefernandozanella.kantek@windriver.com>
This commit is contained in:
Andre Kantek 2024-04-18 08:18:21 -03:00
parent b6682707ae
commit 86e8baefa7
1 changed files with 7 additions and 14 deletions

View File

@ -1717,20 +1717,13 @@ def generate_unassigned_pxeboot_intf_config(context, config, db_api,
def get_address_config(context, iface, addresses):
ifname = get_interface_os_ifname(context, iface)
if constants.DUAL_STACK_COMPATIBILITY_MODE:
address = addresses[0]
return {
'ifname': ifname,
'address': str(address.address) + '/' + str(address.prefix)
}
else:
address_list = []
for address in addresses:
address_list.append(str(address.address) + '/' + str(address.prefix))
return {
'ifname': ifname,
'addresses': address_list,
}
address_list = []
for address in addresses:
address_list.append(str(address.address) + '/' + str(address.prefix))
return {
'ifname': ifname,
'addresses': address_list,
}
def generate_address_configs(context, config):