deb-sahara/tools/gate/scenario/commons
Sergey Lukjanov 9413b830df Run scenario tests for the fake plugin in gate
Generate template_vars.ini for the scenario testing framework
and run it using existing templates for sahara-ci (tmp).

Change-Id: Ibfd787247bf04b3c75d7341c3fecd6a5c5621e0d
2015-08-18 17:28:46 +03:00

43 lines
1.3 KiB
Bash

#!/bin/bash
#
# Copyright (c) 2015 Mirantis Inc.
#
# 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.
export NETWORK=${1:-neutron}
export ENGINE=${2:-heat}
# Normalize network name
if [[ $NETWORK == nova* ]]; then
export NETWORK="nova-network"
fi
source settings
export DEST=${DEST:-$BASE/new}
export DEVSTACK_DIR=${DEVSTACK_DIR:-$DEST/devstack}
export SAHARA_DIR=${SAHARA_DIR:-$DEST/sahara}
export LOCALRC_PATH=$DEVSTACK_DIR/localrc
export LOCALCONF_PATH=$DEVSTACK_DIR/local.conf
function sahara_register_fake_plugin_image {
local props="--property _sahara_tag_0.1=True"
props+=" --property _sahara_tag_fake=True"
props+=" --property _sahara_username=$SAHARA_FAKE_PLUGIN_IMAGE_USERNAME"
openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set \
$SAHARA_FAKE_PLUGIN_IMAGE_NAME $props
}