Replace Q_L3_ENABLED by is_service_enabled q-l3

This patch replaces Q_L3_ENABLED with is_service_enabled q-l3.
Both of them idicates wherever Neutron L3 agent is enabled or not.

Change-Id: I33f0f5a6174d1d170bc2ac1c2e3a096d88d17cc1
This commit is contained in:
vsaienko 2016-05-13 12:51:30 +03:00 committed by Sean M. Collins
parent 18534b2805
commit d894221457
3 changed files with 5 additions and 13 deletions

View File

@ -88,7 +88,6 @@ serving as a hypervisor for guest instances.
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth0
# Open vSwitch provider networking configuration
@ -387,7 +386,6 @@ controller node.
OVS_PHYSICAL_BRIDGE=br-ex
Q_USE_PROVIDER_NETWORKING=True
Q_L3_ENABLED=False
# Do not use Nova-Network
disable_service n-net
@ -434,13 +432,12 @@ compute node 1.
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_INTERFACE=eth1
Q_USE_PROVIDER_NETWORKING=True
Q_L3_ENABLED=False
Compute node 2's configuration will be exactly the same, except
``HOST_IP`` will be ``10.0.0.4``
When DevStack is configured to use provider networking (via
``Q_USE_PROVIDER_NETWORKING`` is True and ``Q_L3_ENABLED`` is False) -
``Q_USE_PROVIDER_NETWORKING`` is True) -
DevStack will automatically add the network interface defined in
``PUBLIC_INTERFACE`` to the ``OVS_PHYSICAL_BRIDGE``
@ -543,7 +540,6 @@ setup, with small modifications for the interface mappings.
FIXED_RANGE="10.0.0.0/24"
Q_FLOATING_ALLOCATION_POOL=start=172.18.161.250,end=172.18.161.254
PUBLIC_NETWORK_GATEWAY="172.18.161.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=eth0
Q_USE_PROVIDERNET_FOR_PUBLIC=True

View File

@ -23,11 +23,9 @@ Q_USE_PUBLIC_VETH=${Q_USE_PUBLIC_VETH:-False}
Q_PUBLIC_VETH_EX=${Q_PUBLIC_VETH_EX:-veth-pub-ex}
Q_PUBLIC_VETH_INT=${Q_PUBLIC_VETH_INT:-veth-pub-int}
# The next two variables are configured by plugin
# The next variable is configured by plugin
# e.g. _configure_neutron_l3_agent or lib/neutron_plugins/*
#
# The plugin supports L3.
Q_L3_ENABLED=${Q_L3_ENABLED:-True}
# L3 routers exist per tenant
Q_L3_ROUTER_PER_TENANT=${Q_L3_ROUTER_PER_TENANT:-True}
@ -90,7 +88,6 @@ function _determine_config_l3 {
}
function _configure_neutron_l3_agent {
Q_L3_ENABLED=True
cp $NEUTRON_DIR/etc/l3_agent.ini.sample $Q_L3_CONF_FILE
@ -180,7 +177,7 @@ function create_neutron_initial_network {
AUTO_ALLOCATE_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'auto-allocated-topology' | get_field 1)
SUBNETPOOL_EXT=$(neutron --os-cloud devstack-admin --os-region "$REGION_NAME" ext-list | grep 'subnet_allocation' | get_field 1)
if [[ "$Q_L3_ENABLED" == "True" ]]; then
if is_service_enabled q-l3; then
# Create a router, and add the private subnet as one of its interfaces
if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
# create a tenant-owned router.
@ -362,7 +359,7 @@ function _neutron_configure_router_v6 {
}
function is_provider_network {
if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ] && [ "$Q_L3_ENABLED" == "False" ]; then
if [ "$Q_USE_PROVIDER_NETWORKING" == "True" ]; then
return 0
fi
return 1

View File

@ -16,7 +16,6 @@
# - ``BASE_SQL_CONN`` ``lib/database`` declares
# - ``PUBLIC_NETWORK_NAME``
# - ``Q_ROUTER_NAME``
# - ``Q_L3_ENABLED``
# - ``VIRT_DRIVER``
# - ``LIBVIRT_TYPE``
# - ``KEYSTONE_SERVICE_PROTOCOL``, ``KEYSTONE_SERVICE_HOST`` from lib/keystone
@ -239,7 +238,7 @@ function configure_tempest {
ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
if [ "$Q_L3_ENABLED" = "True" ]; then
if is_service_enabled q-l3; then
public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
awk '{print $2}')
fi