Fix duplicate ports returned from determine_ports().
This commit is contained in:
parent
e7880f17b8
commit
66bf59bbc0
@ -182,7 +182,7 @@ def determine_ports():
|
||||
ports.append(API_PORTS[service])
|
||||
except KeyError:
|
||||
pass
|
||||
return ports
|
||||
return list(set(ports))
|
||||
|
||||
|
||||
def api_port(service):
|
||||
|
@ -152,6 +152,7 @@ class NovaCCUtilsTests(CharmTestCase):
|
||||
def test_determine_ports(self, restart_map):
|
||||
restart_map.return_value = {
|
||||
'/etc/nova/nova.conf': ['nova-api-os-compute', 'nova-api-ec2'],
|
||||
'/etc/nova/api-paste.ini': ['nova-api-os-compute', 'nova-api-ec2'],
|
||||
'/etc/quantum/quantum.conf': ['quantum-server'],
|
||||
}
|
||||
ports = utils.determine_ports()
|
||||
|
Loading…
x
Reference in New Issue
Block a user