diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py index 9a33a035..e5feff56 100644 --- a/hooks/charmhelpers/contrib/openstack/context.py +++ b/hooks/charmhelpers/contrib/openstack/context.py @@ -880,6 +880,19 @@ class NeutronContext(OSContextGenerator): return calico_ctxt + def pg_ctxt(self): + driver = neutron_plugin_attribute(self.plugin, 'driver', + self.network_manager) + config = neutron_plugin_attribute(self.plugin, 'config', + self.network_manager) + ovs_ctxt = {'core_plugin': driver, + 'neutron_plugin': 'plumgrid', + 'neutron_security_groups': self.neutron_security_groups, + 'local_ip': unit_private_ip(), + 'config': config} + + return ovs_ctxt + def neutron_ctxt(self): if https(): proto = 'https' @@ -914,6 +927,8 @@ class NeutronContext(OSContextGenerator): ctxt.update(self.calico_ctxt()) elif self.plugin == 'vsp': ctxt.update(self.nuage_ctxt()) + elif self.plugin == 'plumgrid': + ctxt.update(self.pg_ctxt()) alchemy_flags = config('neutron-alchemy-flags') if alchemy_flags: diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py index c3d5c28e..55b2037f 100644 --- a/hooks/charmhelpers/contrib/openstack/neutron.py +++ b/hooks/charmhelpers/contrib/openstack/neutron.py @@ -195,6 +195,20 @@ def neutron_plugins(): 'packages': [], 'server_packages': ['neutron-server', 'neutron-plugin-nuage'], 'server_services': ['neutron-server'] + }, + 'plumgrid': { + 'config': '/etc/neutron/plugins/plumgrid/plumgrid.ini', + 'driver': 'neutron.plugins.plumgrid.plumgrid_plugin.plumgrid_plugin.NeutronPluginPLUMgridV2', + 'contexts': [ + context.SharedDBContext(user=config('database-user'), + database=config('database'), + ssl_dir=NEUTRON_CONF_DIR)], + 'services': [], + 'packages': [['plumgrid-lxc'], + ['iovisor-dkms']], + 'server_packages': ['neutron-server', + 'neutron-plugin-plumgrid'], + 'server_services': ['neutron-server'] } } if release >= 'icehouse': diff --git a/templates/icehouse/nova.conf b/templates/icehouse/nova.conf index 0cf8720f..d063f137 100644 --- a/templates/icehouse/nova.conf +++ b/templates/icehouse/nova.conf @@ -85,6 +85,11 @@ security_group_api = neutron firewall_driver = nova.virt.firewall.NoopFirewallDriver {% endif -%} +{% if neutron_plugin and neutron_plugin == 'plumgrid' -%} +security_group_api=neutron +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} + {% if network_manager_config -%} {% for key, value in network_manager_config.iteritems() -%} {{ key }} = {{ value }} diff --git a/templates/juno/nova.conf b/templates/juno/nova.conf index bfa61d6b..f0c33c05 100644 --- a/templates/juno/nova.conf +++ b/templates/juno/nova.conf @@ -90,6 +90,11 @@ security_group_api = neutron firewall_driver = nova.virt.firewall.NoopFirewallDriver {% endif -%} +{% if neutron_plugin and neutron_plugin == 'plumgrid' -%} +security_group_api=neutron +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} + {% if network_manager_config -%} {% for key, value in network_manager_config.iteritems() -%} {{ key }} = {{ value }} diff --git a/templates/kilo/nova.conf b/templates/kilo/nova.conf index 4fdc30bc..a8f92d18 100644 --- a/templates/kilo/nova.conf +++ b/templates/kilo/nova.conf @@ -72,6 +72,11 @@ security_group_api = neutron firewall_driver = nova.virt.firewall.NoopFirewallDriver {% endif -%} +{% if neutron_plugin and neutron_plugin == 'plumgrid' -%} +security_group_api=neutron +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} + {% if network_manager != 'neutron' and network_manager_config -%} {% for key, value in network_manager_config.iteritems() -%} {{ key }} = {{ value }}