1. What is the problem?
Tricircle now is dedicated for networking automation across Neutron. Some
tables used in APIs gateway should be removed, like aggregation table, pod
binding table, etc. They should not reside in the Tricircle any more. Other
tables containing old meanings but are still in use should be renamed for
better understanding. We can see the blueprint[1] for further explanation.
2. What is the solution to the problem?
The data models, tables and APIs about aggregation, pod binding, etc. should
be removed. After the pod binding table is removed, the az_hint used for
external network creation is hard to match. So special handle needs to be
implemented. Other tables will have vague meaning after this splitting, but
they still take effective in the Tricircle, So they should be renamed for
better understanding. What's more, the pod_name in the pod table is renamed
to region_name, which coordinates better with its availability zone.
1)Tables to be removed:
*aggregates
*aggregate_metadata
*instance_types
*instance_type_projects
*instance_type_extra_specs
*key_pairs
*pod_binding
2)Tables need to be renamed:
*cascaded_pod_service_configuration (new name: cached_endpoints)
*cascaded_pods (new name: pods)
*cascaded_pods_resource_routing (new name: resource_routings)
*job (new name: async_jobs)
3. What the features need to be implemented to the Tricircle to realize
the solution?
After the pod binding table is removed, the az_hint used for external
network creation is hard to match. New features will be implemented to solve
this problem.
[1] https://blueprints.launchpad.net/tricircle/+spec/clean-legacy-tables
Change-Id: I025b4fb48c70abf424bd458fac0dc888e5fa19fd
90 lines
3.1 KiB
Bash
Executable File
90 lines
3.1 KiB
Bash
Executable File
#!/bin/bash -xe
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# This script is executed inside post_test_hook function in devstack gate.
|
|
|
|
export DEST=$BASE/new
|
|
export DEVSTACK_DIR=$DEST/devstack
|
|
export TRICIRCLE_DIR=$DEST/tricircle
|
|
export TRICIRCLE_DEVSTACK_PLUGIN_DIR=$TRICIRCLE_DIR/devstack
|
|
export TRICIRCLE_TEMPEST_PLUGIN_DIR=$TRICIRCLE_DIR/tricircle/tempestplugin
|
|
export TEMPEST_DIR=$DEST/tempest
|
|
export TEMPEST_CONF=$TEMPEST_DIR/etc/tempest.conf
|
|
|
|
# use admin role to create Tricircle top Pod and Pod1
|
|
source $DEVSTACK_DIR/openrc admin admin
|
|
|
|
token=$(openstack token issue | awk 'NR==5 {print $4}')
|
|
echo $token
|
|
|
|
curl -X POST http://127.0.0.1:19999/v1.0/pods \
|
|
-H "Content-Type: application/json" \
|
|
-H "X-Auth-Token: $token" -d '{"pod": {"region_name": "RegionOne"}}'
|
|
|
|
curl -X POST http://127.0.0.1:19999/v1.0/pods \
|
|
-H "Content-Type: application/json" \
|
|
-H "X-Auth-Token: $token" \
|
|
-d '{"pod": {"region_name": "Pod1", "az_name": "az1"}}'
|
|
|
|
# the usage of "nova flavor-create":
|
|
# nova flavor-create [--ephemeral <ephemeral>] [--swap <swap>]
|
|
# [--rxtx-factor <factor>] [--is-public <is-public>]
|
|
# <name> <id> <ram> <disk> <vcpus>
|
|
# the following command is to create a flavor with name='test',
|
|
# id=1, ram=1024MB, disk=10GB, vcpu=1
|
|
# nova flavor-create test 1 1024 10 1
|
|
image_id=$(openstack image list | awk 'NR==4 {print $2}')
|
|
|
|
# preparation for the tests
|
|
cd $TEMPEST_DIR
|
|
if [ -d .testrepository ]; then
|
|
sudo rm -r .testrepository
|
|
fi
|
|
|
|
sudo chown -R jenkins:stack $DEST/tempest
|
|
# sudo chown -R jenkins:stack $BASE/data/tempest
|
|
|
|
# change the tempest configruation to test Tricircle
|
|
env | grep OS_
|
|
|
|
# import functions needed for the below workaround
|
|
source $DEVSTACK_DIR/functions
|
|
|
|
# designate is a good example how to config TEMPEST_CONF
|
|
iniset $TEMPEST_CONF auth admin_username ${ADMIN_USERNAME:-"admin"}
|
|
iniset $TEMPEST_CONF auth admin_project_name admin
|
|
iniset $TEMPEST_CONF auth admin_password $OS_PASSWORD
|
|
iniset $TEMPEST_CONF identity uri $OS_AUTH_URL
|
|
iniset $TEMPEST_CONF identity-feature-enabled api_v3 false
|
|
|
|
iniset $TEMPEST_CONF compute region RegionOne
|
|
iniset $TEMPEST_CONF compute image_ref $image_id
|
|
iniset $TEMPEST_CONF compute image_ref_alt $image_id
|
|
|
|
iniset $TEMPEST_CONF volume region RegionOne
|
|
iniset $TEMPEST_CONF volume catalog_type volumev2
|
|
iniset $TEMPEST_CONF volume endpoint_type publicURL
|
|
iniset $TEMPEST_CONF volume-feature-enabled api_v1 false
|
|
|
|
iniset $TEMPEST_CONF validation connect_method fixed
|
|
|
|
|
|
# Run the Network Tempest tests
|
|
cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
|
|
sudo BASE=$BASE ./tempest_network.sh
|
|
|
|
# Run the Scenario Tempest tests
|
|
# cd $TRICIRCLE_TEMPEST_PLUGIN_DIR
|
|
# sudo BASE=$BASE ./tempest_scenario.sh
|