Merge "Improve quantum l3 and tempest config."
This commit is contained in:
commit
2cd482818e
11
lib/quantum
11
lib/quantum
@ -92,6 +92,8 @@ Q_META_DATA_IP=${Q_META_DATA_IP:-$HOST_IP}
|
|||||||
Q_ALLOW_OVERLAPPING_IP=${Q_ALLOW_OVERLAPPING_IP:-False}
|
Q_ALLOW_OVERLAPPING_IP=${Q_ALLOW_OVERLAPPING_IP:-False}
|
||||||
# Use quantum-debug command
|
# Use quantum-debug command
|
||||||
Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
|
Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
|
||||||
|
# The name of the default q-l3 router
|
||||||
|
Q_ROUTER_NAME=${Q_ROUTER_NAME:-router1}
|
||||||
|
|
||||||
if is_service_enabled quantum; then
|
if is_service_enabled quantum; then
|
||||||
Q_RR_CONF_FILE=$QUANTUM_CONF_DIR/rootwrap.conf
|
Q_RR_CONF_FILE=$QUANTUM_CONF_DIR/rootwrap.conf
|
||||||
@ -277,7 +279,14 @@ function create_quantum_initial_network() {
|
|||||||
|
|
||||||
if is_service_enabled q-l3; then
|
if is_service_enabled q-l3; then
|
||||||
# Create a router, and add the private subnet as one of its interfaces
|
# Create a router, and add the private subnet as one of its interfaces
|
||||||
ROUTER_ID=$(quantum router-create --tenant_id $TENANT_ID router1 | grep ' id ' | get_field 2)
|
if [[ "$Q_USE_NAMESPACE" == "True" ]]; then
|
||||||
|
# If namespaces are enabled, create a tenant-owned router.
|
||||||
|
ROUTER_ID=$(quantum router-create --tenant_id $TENANT_ID $Q_ROUTER_NAME | grep ' id ' | get_field 2)
|
||||||
|
else
|
||||||
|
# If namespaces are disabled, the L3 agent can only target
|
||||||
|
# a single router, which should not be tenant-owned.
|
||||||
|
ROUTER_ID=$(quantum router-create $Q_ROUTER_NAME | grep ' id ' | get_field 2)
|
||||||
|
fi
|
||||||
quantum router-interface-add $ROUTER_ID $SUBNET_ID
|
quantum router-interface-add $ROUTER_ID $SUBNET_ID
|
||||||
# Create an external network, and a subnet. Configure the external network as router gw
|
# Create an external network, and a subnet. Configure the external network as router gw
|
||||||
EXT_NET_ID=$(quantum net-create "$PUBLIC_NETWORK_NAME" -- --router:external=True | grep ' id ' | get_field 2)
|
EXT_NET_ID=$(quantum net-create "$PUBLIC_NETWORK_NAME" -- --router:external=True | grep ' id ' | get_field 2)
|
||||||
|
11
lib/tempest
11
lib/tempest
@ -11,6 +11,9 @@
|
|||||||
# - ``S3_SERVICE_PORT``
|
# - ``S3_SERVICE_PORT``
|
||||||
# - ``SERVICE_HOST``
|
# - ``SERVICE_HOST``
|
||||||
# - ``BASE_SQL_CONN`` ``lib/database`` declares
|
# - ``BASE_SQL_CONN`` ``lib/database`` declares
|
||||||
|
# - ``PUBLIC_NETWORK_NAME``
|
||||||
|
# - ``Q_USE_NAMESPACE``
|
||||||
|
# - ``Q_ROUTER_NAME``
|
||||||
# Optional Dependencies:
|
# Optional Dependencies:
|
||||||
# IDENTITY_USE_SSL, IDENTITY_HOST, IDENTITY_PORT, IDENTITY_PATH
|
# IDENTITY_USE_SSL, IDENTITY_HOST, IDENTITY_PORT, IDENTITY_PATH
|
||||||
# ALT_* (similar vars exists in keystone_data.sh)
|
# ALT_* (similar vars exists in keystone_data.sh)
|
||||||
@ -61,6 +64,7 @@ function configure_tempest() {
|
|||||||
local flavors_ref
|
local flavors_ref
|
||||||
local flavor_lines
|
local flavor_lines
|
||||||
local public_network_id
|
local public_network_id
|
||||||
|
local public_router_id
|
||||||
local tenant_networks_reachable
|
local tenant_networks_reachable
|
||||||
|
|
||||||
# TODO(afazekas):
|
# TODO(afazekas):
|
||||||
@ -175,6 +179,12 @@ function configure_tempest() {
|
|||||||
if is_service_enabled q-l3; then
|
if is_service_enabled q-l3; then
|
||||||
public_network_id=$(quantum net-list | grep $PUBLIC_NETWORK_NAME | \
|
public_network_id=$(quantum net-list | grep $PUBLIC_NETWORK_NAME | \
|
||||||
awk '{print $2}')
|
awk '{print $2}')
|
||||||
|
if [ "$Q_USE_NAMESPACE" == "False" ]; then
|
||||||
|
# If namespaces are disabled, devstack will create a single
|
||||||
|
# public router that tempest should be configured to use.
|
||||||
|
public_router_id=$(quantum router-list | awk "/ $Q_ROUTER_NAME / \
|
||||||
|
{ print \$2 }")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Timeouts
|
# Timeouts
|
||||||
@ -243,6 +253,7 @@ function configure_tempest() {
|
|||||||
iniset $TEMPEST_CONF network password "$password"
|
iniset $TEMPEST_CONF network password "$password"
|
||||||
iniset $TEMPEST_CONF network tenant_networks_reachable "$tenant_networks_reachable"
|
iniset $TEMPEST_CONF network tenant_networks_reachable "$tenant_networks_reachable"
|
||||||
iniset $TEMPEST_CONF network public_network_id "$public_network_id"
|
iniset $TEMPEST_CONF network public_network_id "$public_network_id"
|
||||||
|
iniset $TEMPEST_CONF network public_router_id "$public_router_id"
|
||||||
|
|
||||||
#boto
|
#boto
|
||||||
iniset $TEMPEST_CONF boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
|
iniset $TEMPEST_CONF boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
|
||||||
|
Loading…
Reference in New Issue
Block a user