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'}
16 : ${NODE_NAME:='unknown'}
17 : ${EXTERNAL_NETWORK:='admin_floating_net'}
19 # Extract network name from EXTERNAL_NETWORK
20 # e.g. EXTERNAL_NETWORK='ext-net;flat;192.168.0.2;192.168.0.253;192.168.0.1;192.168.0.0/24'
21 export EXTERNAL_NETWORK=$(echo $EXTERNAL_NETWORK | cut -f1 -d \;)
24 echo "INFO: Creating openstack credentials .."
26 # Create openstack credentials
27 OPENRC=/home/opnfv/openrc
28 if [ ! -f $OPENRC ]; then
30 $RELENG_REPO_DIR/utils/fetch_os_creds.sh \
32 -i ${INSTALLER_TYPE} -a ${INSTALLER_IP}
34 # Fuel virtual need a fix
35 if [ "$NODE_NAME" == "ericsson-virtual1" ]; then
36 echo "INFO: Changing: internalURL -> publicURL in openrc"
37 sed -i 's/internalURL/publicURL/' $OPENRC
44 export EXTERNAL_NETWORK INSTALLER_TYPE NODE_NAME