From f258309df213c83e4ab95e678f78e709b77c5126 Mon Sep 17 00:00:00 2001 From: James Page Date: Mon, 3 Mar 2014 09:09:17 +0000 Subject: [PATCH] Resync helpers --- hooks/charmhelpers/contrib/hahelpers/cluster.py | 3 +-- hooks/charmhelpers/contrib/openstack/context.py | 2 +- hooks/charmhelpers/contrib/openstack/neutron.py | 17 +++++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hooks/charmhelpers/contrib/hahelpers/cluster.py b/hooks/charmhelpers/contrib/hahelpers/cluster.py index ceabcb25..bf832f7d 100644 --- a/hooks/charmhelpers/contrib/hahelpers/cluster.py +++ b/hooks/charmhelpers/contrib/hahelpers/cluster.py @@ -91,8 +91,7 @@ def https(): . returns: boolean ''' - if (config_get('use-https') is True or - config_get('use-https') in ["yes", 'Yes', 'True', 'true']): + if config_get('use-https') == "yes": return True if config_get('ssl_cert') and config_get('ssl_key'): return True diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py index 249e896c..2403ce16 100644 --- a/hooks/charmhelpers/contrib/openstack/context.py +++ b/hooks/charmhelpers/contrib/openstack/context.py @@ -512,7 +512,7 @@ class NeutronContext(OSContextGenerator): host = config('vip') else: host = unit_get('private-address') - url = '%s://%s:%s' % (proto, host, '9292') + url = '%s://%s:%s' % (proto, host, '9696') ctxt = { 'network_manager': self.network_manager, 'neutron_url': url, diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py index 8d32bd00..a11c08b1 100644 --- a/hooks/charmhelpers/contrib/openstack/neutron.py +++ b/hooks/charmhelpers/contrib/openstack/neutron.py @@ -17,8 +17,11 @@ def headers_package(): kver = check_output(['uname', '-r']).strip() return 'linux-headers-%s' % kver +QUANTUM_CONF_DIR = '/etc/quantum' # legacy + + def quantum_plugins(): from charmhelpers.contrib.openstack import context return { @@ -30,7 +33,8 @@ def quantum_plugins(): 'contexts': [ context.SharedDBContext(user=config('neutron-database-user'), database=config('neutron-database'), - relation_prefix='neutron')], + relation_prefix='neutron', + ssl_dir=QUANTUM_CONF_DIR)], 'services': ['quantum-plugin-openvswitch-agent'], 'packages': [[headers_package(), 'openvswitch-datapath-dkms'], ['quantum-plugin-openvswitch-agent']], @@ -45,7 +49,8 @@ def quantum_plugins(): 'contexts': [ context.SharedDBContext(user=config('neutron-database-user'), database=config('neutron-database'), - relation_prefix='neutron')], + relation_prefix='neutron', + ssl_dir=QUANTUM_CONF_DIR)], 'services': [], 'packages': [], 'server_packages': ['quantum-server', @@ -54,6 +59,8 @@ def quantum_plugins(): } } +NEUTRON_CONF_DIR = '/etc/neutron' + def neutron_plugins(): from charmhelpers.contrib.openstack import context @@ -66,7 +73,8 @@ def neutron_plugins(): 'contexts': [ context.SharedDBContext(user=config('neutron-database-user'), database=config('neutron-database'), - relation_prefix='neutron')], + relation_prefix='neutron', + ssl_dir=NEUTRON_CONF_DIR)], 'services': ['neutron-plugin-openvswitch-agent'], 'packages': [[headers_package(), 'openvswitch-datapath-dkms'], ['quantum-plugin-openvswitch-agent']], @@ -81,7 +89,8 @@ def neutron_plugins(): 'contexts': [ context.SharedDBContext(user=config('neutron-database-user'), database=config('neutron-database'), - relation_prefix='neutron')], + relation_prefix='neutron', + ssl_dir=NEUTRON_CONF_DIR)], 'services': [], 'packages': [], 'server_packages': ['neutron-server',