1 ##############################################################################
2 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
3 # matthew.lijun@huawei.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
17 CREATE_INSTANCE_PATH=$THIS_DIR
20 NET_ID=531c4557-7349-4984-8d5e-cceebb77205f
22 IMAGE_ID=7c2f3e2b-cf6e-44ed-83ac-e87712167f9e
24 INSTANCE_NAME=example_
26 source $OPENRC_PATH/admin-openrc.sh
27 cd $CREATE_INSTANCE_PATH
28 for((count=1;count<=$INSTANCE_NUM;count++))
30 INSTANCE_NAME_TMP=${INSTANCE_NAME}${count}
31 nova boot --nic net-id=${NET_ID} --flavor=${FLAVOR_TYPE} --image=${IMAGE_ID} --security_group=${SEC_GROUP} ${INSTANCE_NAME_TMP}