diff --git a/config.yaml b/config.yaml index b0929f4..26bc6a4 100644 --- a/config.yaml +++ b/config.yaml @@ -39,3 +39,8 @@ options: description: | If True neutron-api charm will install neutron packages for the plugin configured. Also needs to be set in neutron-api charm + connector-type: + type: string + default: distributed + description: | + Tunnel learning diff --git a/hooks/neutron_plumgrid_context.py b/hooks/neutron_plumgrid_context.py index 755bbb6..05e3850 100644 --- a/hooks/neutron_plumgrid_context.py +++ b/hooks/neutron_plumgrid_context.py @@ -117,6 +117,7 @@ class NeutronPGPluginContext(context.NeutronContext): pg_ctxt['pg_metadata_subnet'] = '169.254.169.254/30' pg_ctxt['pg_metadata_port'] = '8775' pg_ctxt['metadata_mode'] = 'tunnel' + pg_ctxt['connector_type'] = config('connector-type') if enable_metadata: plumgrid_edge_ctxt = _edge_context() pg_ctxt['nova_metadata_proxy_secret'] = \ diff --git a/hooks/neutron_plumgrid_utils.py b/hooks/neutron_plumgrid_utils.py index 60f6549..4372113 100644 --- a/hooks/neutron_plumgrid_utils.py +++ b/hooks/neutron_plumgrid_utils.py @@ -12,6 +12,7 @@ import neutron_plumgrid_context from charmhelpers.contrib.openstack import templating from charmhelpers.contrib.openstack.neutron import neutron_plugin_attribute from charmhelpers.contrib.python.packages import pip_install +from charmhelpers.contrib.python.packages import apt_install from charmhelpers.fetch import ( apt_cache ) @@ -156,12 +157,17 @@ def install_networking_plumgrid(): ''' release = os_release('neutron-common', base='kilo') if config('networking-plumgrid-version') is None: - package_version = NETWORKING_PLUMGRID_VERSION[release] + #error point..."KeyError: 'mitaka'"...no net_pg_version for mitaka + #package_version = NETWORKING_PLUMGRID_VERSION[release] + print "######### install_networking_pg()" else: package_version = config('networking-plumgrid-version') - package_name = 'networking-plumgrid==%s' % package_version - pip_install(package_name, fatal=True) - if is_leader() and package_version != '2015.1.1.1': + #package_name = 'networking-plumgrid==%s' % package_version + #pip_install(package_name, fatal=True) + apt_install("git") + pip_install("git+https://github.com/openstack/networking-plumgrid.git", fatal=True) + if is_leader(): + # and package_version != '2015.1.1.1': migrate_neutron_db() diff --git a/templates/kilo/plumlib.ini b/templates/kilo/plumlib.ini index e183ef9..df85c02 100644 --- a/templates/kilo/plumlib.ini +++ b/templates/kilo/plumlib.ini @@ -50,7 +50,7 @@ api_key = 162-22O8BEYWO0DQGIM secret_key = 171de423af844bad400a98ea5b9fa56d [ConnectorType] -connector_type = distributed +connector_type = {{ connector_type }} {% if admin_user -%} [keystone_authtoken]