Fixed incorrect logic in Keystone endpoint inspection
This commit is contained in:
@@ -50,19 +50,20 @@ class KeystoneEndpointsInspection(Inspection):
|
|||||||
(service['name'], service['id'], url_attr)))
|
(service['name'], service['id'], url_attr)))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
nova_compute = None
|
nova_api = None
|
||||||
for c in host.components:
|
for c in host.components:
|
||||||
if c.name != 'nova-compute':
|
if c.name != 'nova-api':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
listen_address = c.config['osapi_compute_listen']
|
listen_address = c.config['osapi_compute_listen']
|
||||||
listen_port = c.config['osapi_compute_listen_port']
|
listen_port = c.config['osapi_compute_listen_port']
|
||||||
|
|
||||||
if (listen_address in ['0.0.0.0', url.hostname] and
|
if (listen_address in ['0.0.0.0', url.hostname] and
|
||||||
listen_port == url.port):
|
listen_port == url.port):
|
||||||
nova_compute = c
|
nova_api = c
|
||||||
break
|
break
|
||||||
|
|
||||||
if not nova_compute:
|
if not nova_api:
|
||||||
keystone.report_issue(
|
keystone.report_issue(
|
||||||
Issue(Issue.ERROR, UNKNOWN_SERVICE_ENDPOINT_MSG %
|
Issue(Issue.ERROR, UNKNOWN_SERVICE_ENDPOINT_MSG %
|
||||||
(service['name'], service['id'], url_attr)))
|
(service['name'], service['id'], url_attr)))
|
||||||
|
|||||||
Reference in New Issue
Block a user