Merge "get_overcloud_hosts() should not return a list with empty strings" into stable/wallaby

This commit is contained in:
Zuul 2022-10-01 04:57:32 +00:00 committed by Gerrit Code Review
commit a1a9919071
2 changed files with 4 additions and 1 deletions

View File

@ -67,12 +67,13 @@ class TestDeploymentWorkflows(utils.TestCommand):
mock_blacklisted_ip_addresses):
stack = mock.Mock()
working_dir = mock.Mock()
# empty string added to Compute ctlplane to test LP 1990566 fix
mock_role_net_ip_map.return_value = {
'Controller': {
'ctlplane': ['1.1.1.1', '2.2.2.2', '3.3.3.3'],
'external': ['4.4.4.4', '5.5.5.5', '6.6.6.6']},
'Compute': {
'ctlplane': ['7.7.7.7', '8.8.8.8', '9.9.9.9'],
'ctlplane': ['7.7.7.7', '', '8.8.8.8', '9.9.9.9'],
'external': ['10.10.10.10', '11.11.11.11', '12.12.12.12']},
}
mock_blacklisted_ip_addresses.return_value = []

View File

@ -110,6 +110,8 @@ def get_overcloud_hosts(stack, ssh_network, working_dir):
ips.extend(net_ips)
# ensure there are no empty strings in IP list (LP1990566)
ips = [i for i in ips if i]
return ips