Lint and tipdyup
This commit is contained in:
parent
bc7438a700
commit
d189c5ebe1
@ -240,9 +240,10 @@ class NeutronApiSDNContext(context.SubordinateConfigContext):
|
||||
interfaces = 'neutron-plugin-api-subordinate'
|
||||
|
||||
def __init__(self):
|
||||
super(NeutronApiSDNContext, self).__init__(interface='neutron-plugin-api-subordinate',
|
||||
service='neutron-api',
|
||||
config_file='/etc/neutron/neutron.conf')
|
||||
super(NeutronApiSDNContext, self).__init__(
|
||||
interface='neutron-plugin-api-subordinate',
|
||||
service='neutron-api',
|
||||
config_file='/etc/neutron/neutron.conf')
|
||||
|
||||
def __call__(self):
|
||||
ctxt = super(NeutronApiSDNContext, self).__call__()
|
||||
@ -280,21 +281,15 @@ class NeutronApiSDNContext(context.SubordinateConfigContext):
|
||||
return ctxt
|
||||
return ctxt
|
||||
|
||||
|
||||
class NeutronApiSDNConfigFileContext(context.OSContextGenerator):
|
||||
interfaces = ['neutron-plugin-api-subordinate']
|
||||
|
||||
def __call__(self):
|
||||
ctxt = {}
|
||||
defaults = {
|
||||
'neutron-plugin-config': {
|
||||
'templ_key': 'neutron_plugin_config',
|
||||
'value': '/etc/neutron/plugins/ml2/ml2_conf.ini',
|
||||
},
|
||||
}
|
||||
for rid in relation_ids('neutron-plugin-api-subordinate'):
|
||||
for unit in related_units(rid):
|
||||
rdata = relation_get(rid=rid, unit=unit)
|
||||
neutron_server_plugin_config = rdata.get('neutron-plugin-config')
|
||||
if neutron_server_plugin_config:
|
||||
return { 'config': neutron_server_plugin_config }
|
||||
return { 'config': '/etc/neutron/plugins/ml2/ml2_conf.ini' }
|
||||
neutron_server_plugin_conf = rdata.get('neutron-plugin-config')
|
||||
if neutron_server_plugin_conf:
|
||||
return {'config': neutron_server_plugin_conf}
|
||||
return {'config': '/etc/neutron/plugins/ml2/ml2_conf.ini'}
|
||||
|
@ -143,8 +143,6 @@ def configure_https():
|
||||
def install():
|
||||
execd_preinstall()
|
||||
configure_installation_source(config('openstack-origin'))
|
||||
# XXX Remove me when patched nova and neutron are in the main ppa
|
||||
configure_installation_source('ppa:gnuoy/sdn-test')
|
||||
|
||||
apt_update()
|
||||
apt_install(determine_packages(config('openstack-origin')),
|
||||
|
@ -161,6 +161,7 @@ def api_port(service):
|
||||
def manage_plugin():
|
||||
return config('manage-neutron-plugin-legacy-mode')
|
||||
|
||||
|
||||
def determine_packages(source=None):
|
||||
# currently all packages match service names
|
||||
packages = [] + BASE_PACKAGES
|
||||
@ -214,8 +215,8 @@ def resource_map():
|
||||
resource_map.pop(APACHE_24_CONF)
|
||||
|
||||
if manage_plugin():
|
||||
# add neutron plugin requirements. nova-c-c only needs the neutron-server
|
||||
# associated with configs, not the plugin agent.
|
||||
# add neutron plugin requirements. nova-c-c only needs the
|
||||
# neutron-server associated with configs, not the plugin agent.
|
||||
plugin = config('neutron-plugin')
|
||||
conf = neutron_plugin_attribute(plugin, 'config', 'neutron')
|
||||
ctxts = (neutron_plugin_attribute(plugin, 'contexts', 'neutron')
|
||||
|
Loading…
x
Reference in New Issue
Block a user