From 10543a2aef937662db1707b8aa9371f136acf363 Mon Sep 17 00:00:00 2001 From: Matthew J Black Date: Tue, 24 May 2016 22:30:55 -0400 Subject: [PATCH] Added changes for lbaas testing. Scenario001 has been updated to test lbaas v2. Scenario002 and Scenario003 will do lbaas v1. Change-Id: I824b3fd18bcf965875c663ce03d2a99a771f13ee Depends-On: I69b7635984fe74038db2025b89f638def5029849 --- README.md | 1 + fixtures/scenario001.pp | 4 +++- manifests/neutron.pp | 20 +++++++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c845cd3fa..a4d128912 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ scenario](#All-In-One). | glance | rbd | swift | file | file | | nova | rbd | X | X | X | | neutron | ovs | ovs | linuxbridge | ovs | +| lbaas | v2 | v1 | v1 | v1 | | cinder | rbd | iscsi | | iscsi | | ceilometer | X | | | | | aodh | X | | | | diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index f0fd6fd70..81075dea0 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -41,7 +41,9 @@ include ::openstack_integration::keystone class { '::openstack_integration::glance': backend => 'rbd', } -include ::openstack_integration::neutron +class { '::openstack_integration::neutron': + lbaasv2 => true +} class { '::openstack_integration::nova': libvirt_rbd => true, } diff --git a/manifests/neutron.pp b/manifests/neutron.pp index 6718b2914..b8bf5df6d 100644 --- a/manifests/neutron.pp +++ b/manifests/neutron.pp @@ -5,8 +5,13 @@ # Can be: openvswitch or linuxbridge. # Defaults to 'ml2_ovs'. # +# [*lbaasv2*] +# (optional) Configure lbaas v2 instead of v1 +# Defaults to false +# class openstack_integration::neutron ( - $driver = 'openvswitch', + $driver = 'openvswitch', + $lbaasv2 = false, ) { include ::openstack_integration::config @@ -111,7 +116,10 @@ class openstack_integration::neutron ( rpc_workers => 2, auth_uri => $::openstack_integration::config::keystone_auth_uri, auth_url => $::openstack_integration::config::keystone_admin_uri, + service_providers => ['LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default', + 'LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver'], } + class { '::neutron::services::lbaas': } class { '::neutron::plugins::ml2': type_drivers => ['vxlan', 'flat'], tenant_network_types => ['vxlan', 'flat'], @@ -123,9 +131,19 @@ class openstack_integration::neutron ( shared_secret => 'a_big_secret', metadata_workers => 2, } + if $lbaasv2 { + $lbaasv1 = false + $device_driver = 'neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver' + } else { + $lbaasv1 = true + $device_driver = 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver' + } class { '::neutron::agents::lbaas': interface_driver => $driver, + enable_v1 => $lbaasv1, + enable_v2 => $lbaasv2, debug => true, + device_driver => $device_driver } class { '::neutron::agents::l3': interface_driver => $driver,