diff --git a/tripleoclient/tests/v1/undercloud/test_config.py b/tripleoclient/tests/v1/undercloud/test_config.py index a245215d3..d8862a170 100644 --- a/tripleoclient/tests/v1/undercloud/test_config.py +++ b/tripleoclient/tests/v1/undercloud/test_config.py @@ -319,18 +319,14 @@ class TestNetworkSettings(TestBaseNetworkSettings): undercloud_admin_host='192.168.24.3', undercloud_public_host='192.168.24.1', generate_service_certificate=True) - self.assertRaises(exceptions.InvalidConfiguration, - undercloud_config._process_network_args, - env) + undercloud_config._process_network_args(env) # undercloud_admin_host == undercloud_public_host self.conf.config(local_ip='192.168.24.1/24', undercloud_admin_host='192.168.24.2', undercloud_public_host='192.168.24.2', generate_service_certificate=True) - self.assertRaises(exceptions.InvalidConfiguration, - undercloud_config._process_network_args, - env) + undercloud_config._process_network_args(env) # We do not care about ip duplication when ssl is disabled self.conf.config(local_ip='192.168.24.1/24', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 9d80b270c..745721ffd 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -395,15 +395,9 @@ def _process_network_args(env): # value here. if (CONF.get('generate_service_certificate') or CONF.get('undercloud_service_certificate')): - undercloud_ips = [ - CONF.local_ip.split('/')[0], - CONF.undercloud_admin_host, - CONF.undercloud_public_host - ] - if len(undercloud_ips) != len(set(undercloud_ips)): - msg = ("The same IP is used for multiple endpoints. Please use " - "unique ips for local_ip, undercloud_admin_host and " - "undercloud_public_host") + if CONF.local_ip.split('/')[0] == CONF.undercloud_admin_host: + msg = ("Different IPs should be assigned to local_ip and " + "undercloud_admin_host") raise exceptions.InvalidConfiguration(msg)