Resync helpers

This commit is contained in:
James Page 2014-03-03 09:09:17 +00:00
parent 6617d8538f
commit f258309df2
3 changed files with 15 additions and 7 deletions

View File

@ -91,8 +91,7 @@ def https():
. .
returns: boolean returns: boolean
''' '''
if (config_get('use-https') is True or if config_get('use-https') == "yes":
config_get('use-https') in ["yes", 'Yes', 'True', 'true']):
return True return True
if config_get('ssl_cert') and config_get('ssl_key'): if config_get('ssl_cert') and config_get('ssl_key'):
return True return True

View File

@ -512,7 +512,7 @@ class NeutronContext(OSContextGenerator):
host = config('vip') host = config('vip')
else: else:
host = unit_get('private-address') host = unit_get('private-address')
url = '%s://%s:%s' % (proto, host, '9292') url = '%s://%s:%s' % (proto, host, '9696')
ctxt = { ctxt = {
'network_manager': self.network_manager, 'network_manager': self.network_manager,
'neutron_url': url, 'neutron_url': url,

View File

@ -17,8 +17,11 @@ def headers_package():
kver = check_output(['uname', '-r']).strip() kver = check_output(['uname', '-r']).strip()
return 'linux-headers-%s' % kver return 'linux-headers-%s' % kver
QUANTUM_CONF_DIR = '/etc/quantum'
# legacy # legacy
def quantum_plugins(): def quantum_plugins():
from charmhelpers.contrib.openstack import context from charmhelpers.contrib.openstack import context
return { return {
@ -30,7 +33,8 @@ def quantum_plugins():
'contexts': [ 'contexts': [
context.SharedDBContext(user=config('neutron-database-user'), context.SharedDBContext(user=config('neutron-database-user'),
database=config('neutron-database'), database=config('neutron-database'),
relation_prefix='neutron')], relation_prefix='neutron',
ssl_dir=QUANTUM_CONF_DIR)],
'services': ['quantum-plugin-openvswitch-agent'], 'services': ['quantum-plugin-openvswitch-agent'],
'packages': [[headers_package(), 'openvswitch-datapath-dkms'], 'packages': [[headers_package(), 'openvswitch-datapath-dkms'],
['quantum-plugin-openvswitch-agent']], ['quantum-plugin-openvswitch-agent']],
@ -45,7 +49,8 @@ def quantum_plugins():
'contexts': [ 'contexts': [
context.SharedDBContext(user=config('neutron-database-user'), context.SharedDBContext(user=config('neutron-database-user'),
database=config('neutron-database'), database=config('neutron-database'),
relation_prefix='neutron')], relation_prefix='neutron',
ssl_dir=QUANTUM_CONF_DIR)],
'services': [], 'services': [],
'packages': [], 'packages': [],
'server_packages': ['quantum-server', 'server_packages': ['quantum-server',
@ -54,6 +59,8 @@ def quantum_plugins():
} }
} }
NEUTRON_CONF_DIR = '/etc/neutron'
def neutron_plugins(): def neutron_plugins():
from charmhelpers.contrib.openstack import context from charmhelpers.contrib.openstack import context
@ -66,7 +73,8 @@ def neutron_plugins():
'contexts': [ 'contexts': [
context.SharedDBContext(user=config('neutron-database-user'), context.SharedDBContext(user=config('neutron-database-user'),
database=config('neutron-database'), database=config('neutron-database'),
relation_prefix='neutron')], relation_prefix='neutron',
ssl_dir=NEUTRON_CONF_DIR)],
'services': ['neutron-plugin-openvswitch-agent'], 'services': ['neutron-plugin-openvswitch-agent'],
'packages': [[headers_package(), 'openvswitch-datapath-dkms'], 'packages': [[headers_package(), 'openvswitch-datapath-dkms'],
['quantum-plugin-openvswitch-agent']], ['quantum-plugin-openvswitch-agent']],
@ -81,7 +89,8 @@ def neutron_plugins():
'contexts': [ 'contexts': [
context.SharedDBContext(user=config('neutron-database-user'), context.SharedDBContext(user=config('neutron-database-user'),
database=config('neutron-database'), database=config('neutron-database'),
relation_prefix='neutron')], relation_prefix='neutron',
ssl_dir=NEUTRON_CONF_DIR)],
'services': [], 'services': [],
'packages': [], 'packages': [],
'server_packages': ['neutron-server', 'server_packages': ['neutron-server',