Minor bug fixes

This commit is contained in:
Liam Young 2014-06-17 10:48:24 +01:00
parent cfa683555e
commit 187386b327
3 changed files with 1 additions and 29 deletions

View File

@ -28,8 +28,6 @@ class HAIncompleteConfig(Exception):
def is_clustered():
if relation_ids('ha'):
else:
for r_id in (relation_ids('ha') or []):
for unit in (relation_list(r_id) or []):
clustered = relation_get('clustered',
@ -70,7 +68,6 @@ def oldest_peer(peers):
remote_unit_no = int(peer.split('/')[1])
if remote_unit_no < local_unit_no:
return False
else:
return True

View File

@ -42,7 +42,6 @@ from neutron_api_utils import (
restart_map,
NEUTRON_CONF,
api_port,
auth_token_config,
keystone_ca_cert_b64,
CLUSTER_RES,
)
@ -137,30 +136,6 @@ def postgresql_neutron_db_changed():
# DB config might have been moved to main neutron.conf in H?
CONFIGS.write(neutron_plugin_attribute(plugin, 'config'))
def _auth_config():
'''Grab all KS auth token config from api-paste.ini, or return empty {}'''
ks_auth_host = auth_token_config('auth_host')
if not ks_auth_host:
# if there is no auth_host set, identity-service changed hooks
# have not fired, yet.
return {}
cfg = {
'auth_host': ks_auth_host,
'auth_port': auth_token_config('auth_port'),
'auth_protocol': auth_token_config('auth_protocol'),
'service_protocol': auth_token_config('service_protocol'),
'service_port': auth_token_config('service_port'),
'service_username': auth_token_config('admin_user'),
'service_password': auth_token_config('admin_password'),
'service_tenant_name': auth_token_config('admin_tenant_name'),
'auth_uri': auth_token_config('auth_uri'),
# quantum-gateway interface deviates a bit.
'keystone_host': ks_auth_host,
'service_tenant': auth_token_config('admin_tenant_name'),
}
return cfg
@hooks.hook('amqp-relation-broken',
'identity-service-relation-broken',
'shared-db-relation-broken',

View File

@ -132,7 +132,7 @@ def resource_map():
# update for postgres
resource_map[conf]['contexts'].append(
neutron_api_context.NeutronPostgresqlDBContext())
context.PostgresqlDBContext(database=config('database')))
return resource_map