Change the restapi cmd to openstack api

1. What is the problem?

    Now we use the restapi cmd to run ci.

2. What is the solution to the problem?

    Change the restapi cmd to openstack api

3. What the features to be implemented in the Tricircle to realize the solution?

    No

Signed-off-by: song baisen <songbaisen@szzt.com.cn>

Change-Id: Id591dc4795a4c543dd86ce75644c9f8806500339
Co-Authored-By: tangzhuo <ztang@hnu.edu.cn>, zhiyuan_cai <luckyvega.g@gmail.com>
This commit is contained in:
songbaisen 2018-08-29 15:22:19 +08:00
parent 1e7e1b3a54
commit 64c7d476f9
1 changed files with 3 additions and 11 deletions

View File

@ -33,20 +33,12 @@ unset OS_REGION_NAME
mytoken=$(openstack --os-region-name=RegionOne token issue | awk 'NR==5 {print $4}') mytoken=$(openstack --os-region-name=RegionOne token issue | awk 'NR==5 {print $4}')
echo $mytoken echo $mytoken
curl -X POST http://$PRIMARY_NODE_IP/tricircle/v1.0/pods \ openstack multiregion networking pod create --region-name CentralRegion
-H "Content-Type: application/json" \
-H "X-Auth-Token: $mytoken" -d '{"pod": {"region_name": "CentralRegion"}}'
curl -X POST http://$PRIMARY_NODE_IP/tricircle/v1.0/pods \ openstack multiregion networking pod create --region-name RegionOne --availability-zone az1
-H "Content-Type: application/json" \
-H "X-Auth-Token: $mytoken" \
-d '{"pod": {"region_name": "RegionOne", "az_name": "az1"}}'
if [ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]; then if [ "$DEVSTACK_GATE_TOPOLOGY" == "multinode" ]; then
curl -X POST http://$PRIMARY_NODE_IP/tricircle/v1.0/pods \ openstack multiregion networking pod create --region-name RegionTwo --availability-zone az2
-H "Content-Type: application/json" \
-H "X-Auth-Token: $mytoken" \
-d '{"pod": {"region_name": "RegionTwo", "az_name": "az2"}}'
fi fi
# the usage of "nova flavor-create": # the usage of "nova flavor-create":