Commit 5509d61f authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

wip slapgrid: support getFullHostingIpAddressList with new IP

parent b7dbd184
...@@ -1033,8 +1033,22 @@ stderr_logfile_backups=1 ...@@ -1033,8 +1033,22 @@ stderr_logfile_backups=1
elif valid_ipv6(ip): elif valid_ipv6(ip):
ipv6_list.append(ip) ipv6_list.append(ip)
# XXX CLN if not self.api_backward_compatibility:
hosting_ip_list = computer_partition.getFullHostingIpAddressList() hosting_ip_list = []
# Get all the instances of the instance tree
related_instance_list = self.slap.jio_api_connector.allDocs({
"portal_type": "Software Instance",
"root_instance_title": computer_partition["root_instance_title"],
}).get("result_list", [])
for instance_result in related_instance_list:
instance = self.slap.jio_api_connector.get({
"portal_type": "Software Instance",
"reference": instance_result["reference"],
})
hosting_ip_list = hosting_ip_list + instance["ip_list"]
else:
hosting_ip_list = computer_partition["slap_partition"].getFullHostingIpAddressList()
for iface, ip in hosting_ip_list: for iface, ip in hosting_ip_list:
if valid_ipv4(ip): if valid_ipv4(ip):
if not ip in ipv4_list: if not ip in ipv4_list:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment