3 # Copyright 2018 Intel Corporation, Inc
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 source common_functions.sh
20 generic_sim_path=${WORKSPACE}/scripts/multicloud-pike/generic_sim
21 multicloud_provision_path=${WORKSPACE}/tests/multicloud-pike/provision
22 # start generic simulator for openstack mock and AAI mock
23 if [[ -z $(docker images -q generic_sim) ]]; then
24 pushd $generic_sim_path
25 docker build -t generic_sim .
29 function start_simulator ()
34 ./run-instance.sh generic_sim $service_name "-v ${multicloud_provision_path}/${service_name}/:/tmp/generic_sim/ -v ${generic_sim_path}/${service_name}/:/etc/generic_sim/ -p $service_port:8080"
35 wait_for_service_init localhost:$service_port
36 bypass_ip_adress $service_name
39 start_simulator nova 8774
40 start_simulator glance 9292
41 start_simulator cinder 8776
42 start_simulator keystone 5000
43 start_simulator aai 8443
45 # start multicloud-pike
46 ./run-instance.sh nexus3.onap.org:10001/onap/multicloud/openstack-pike multicloud-pike "-t -e AAI_SERVICE_URL=http://aai:8080/aai -e no_proxy=$no_proxy -p 9007:9007"
47 SERVICE_IP=$(./get-instance-ip.sh multicloud-pike)
50 docker network create hpa-net
51 for container in aai keystone glance cinder nova multicloud-pike; do
52 docker network connect hpa-net $container
55 bypass_ip_adress $SERVICE_IP
56 wait_for_service_init ${SERVICE_IP}:${SERVICE_PORT}
58 # Pass any variables required by Robot test suites in ROBOT_VARIABLES
59 ROBOT_VARIABLES+="-v SERVICE_IP:${SERVICE_IP} "
60 ROBOT_VARIABLES+="-v SERVICE_PORT:${SERVICE_PORT} "