diff --git a/hooks/quantum_utils.py b/hooks/quantum_utils.py index ce639781..857f8d9a 100644 --- a/hooks/quantum_utils.py +++ b/hooks/quantum_utils.py @@ -186,14 +186,17 @@ def get_packages(): '''Return a list of packages for install based on the configured plugin''' plugin = remap_plugin(config('plugin')) packages = deepcopy(GATEWAY_PKGS[networking_name()][plugin]) - if (get_os_codename_install_source(config('openstack-origin')) - >= 'icehouse' and plugin == 'ovs' - and lsb_release()['DISTRIB_CODENAME'] < 'utopic'): - # NOTE(jamespage) neutron-vpn-agent supercedes l3-agent for icehouse - # but openswan was removed in utopic. - packages.remove('neutron-l3-agent') - packages.append('neutron-vpn-agent') - packages.append('openswan') + source = get_os_codename_install_source(config('openstack-origin')) + if plugin == 'ovs': + if (source >= 'icehouse' and + lsb_release()['DISTRIB_CODENAME'] < 'utopic'): + # NOTE(jamespage) neutron-vpn-agent supercedes l3-agent for + # icehouse but openswan was removed in utopic. + packages.remove('neutron-l3-agent') + packages.append('neutron-vpn-agent') + packages.append('openswan') + if source >= 'kilo': + packages.append('python-neutron-fwaas') return packages diff --git a/templates/kilo/fwaas_driver.ini b/templates/kilo/fwaas_driver.ini new file mode 100644 index 00000000..8ce9e542 --- /dev/null +++ b/templates/kilo/fwaas_driver.ini @@ -0,0 +1,7 @@ +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +############################################################################### +[fwaas] +driver = neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver +enabled = True diff --git a/templates/kilo/lbaas_agent.ini b/templates/kilo/lbaas_agent.ini new file mode 100644 index 00000000..b37b7e1d --- /dev/null +++ b/templates/kilo/lbaas_agent.ini @@ -0,0 +1,8 @@ +[DEFAULT] +periodic_interval = 10 +interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver +ovs_use_veth = False +device_driver = neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver +[haproxy] +loadbalancer_state_path = $state_path/lbaas +user_group = nogroup diff --git a/templates/kilo/nova.conf b/templates/kilo/nova.conf new file mode 100644 index 00000000..47489f8b --- /dev/null +++ b/templates/kilo/nova.conf @@ -0,0 +1,29 @@ +# kilo +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +############################################################################### +[DEFAULT] +logdir=/var/log/nova +state_path=/var/lib/nova +lock_path=/var/lock/nova +root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf +verbose= {{ verbose }} +use_syslog = {{ use_syslog }} +api_paste_config=/etc/nova/api-paste.ini +enabled_apis=metadata +multi_host=True +{% include "parts/database" %} +# Access to message bus +{% include "parts/rabbitmq" %} +# Access to neutron API services +network_api_class=nova.network.neutronv2.api.API +[neutron] +auth_strategy=keystone +url={{ quantum_url }} +admin_tenant_name={{ service_tenant }} +admin_username={{ service_username }} +admin_password={{ service_password }} +admin_auth_url={{ service_protocol }}://{{ keystone_host }}:{{ service_port }}/v2.0 +service_metadata_proxy=True +metadata_proxy_shared_secret={{ shared_secret }} diff --git a/templates/kilo/vpn_agent.ini b/templates/kilo/vpn_agent.ini new file mode 100644 index 00000000..90874fd0 --- /dev/null +++ b/templates/kilo/vpn_agent.ini @@ -0,0 +1,8 @@ +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +############################################################################### +[vpnagent] +vpn_device_driver=neutron_vpnaas.services.vpn.device_drivers.ipsec.OpenSwanDriver +[ipsec] +ipsec_status_check_interval=60 diff --git a/unit_tests/test_quantum_utils.py b/unit_tests/test_quantum_utils.py index eaa3aa67..8c319761 100644 --- a/unit_tests/test_quantum_utils.py +++ b/unit_tests/test_quantum_utils.py @@ -134,6 +134,11 @@ class TestQuantumUtils(CharmTestCase): self.assertTrue('neutron-vpn-agent' in quantum_utils.get_packages()) self.assertFalse('neutron-l3-agent' in quantum_utils.get_packages()) + def test_get_packages_ovs_kilo(self): + self.config.return_value = 'ovs' + self.get_os_codename_install_source.return_value = 'kilo' + self.assertTrue('python-neutron-fwaas' in quantum_utils.get_packages()) + def test_configure_ovs_starts_service_if_required(self): self.config.return_value = 'ovs' self.service_running.return_value = False