2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 # Perepare the environment to run yardstick ci
13 : ${INSTALLER_TYPE:='fuel'}
14 : ${INSTALLER_IP:='10.20.0.2'}
15 : ${DEPLOY_TYPE:='bm'} # Can be any of 'bm' (Bare Metal) or 'virt' (Virtual)
17 : ${NODE_NAME:='unknown'}
18 : ${EXTERNAL_NETWORK:='admin_floating_net'}
21 # Extract network name from EXTERNAL_NETWORK
22 # e.g. EXTERNAL_NETWORK='ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24'
23 export EXTERNAL_NETWORK=$(echo $EXTERNAL_NETWORK | cut -f1 -d \;)
26 echo "INFO: Creating openstack credentials .."
28 # Create openstack credentials
29 OPENRC=/home/opnfv/openrc
30 if [ ! -f $OPENRC ]; then
31 if [ "$DEPLOY_TYPE" == "virt" ]; then
32 FETCH_CRED_ARG="-v -d $OPENRC -i ${INSTALLER_TYPE} -a ${INSTALLER_IP}"
34 FETCH_CRED_ARG="-d $OPENRC -i ${INSTALLER_TYPE} -a ${INSTALLER_IP}"
37 $RELENG_REPO_DIR/utils/fetch_os_creds.sh $FETCH_CRED_ARG
43 export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME