Use OCC cloud specifier in devstack plugin

Instead of specifying all the dirty auth details in nodepool.yaml rely
on the clouds.yaml devstack cloud specification that devstack writes out
for us.

Change-Id: I95d7f8bcca3ccbd6a320fb595d1de4632615f60f
This commit is contained in:
Clark Boylan
2015-07-31 19:01:22 -07:00
parent 787e592c64
commit a5b5368876
2 changed files with 14 additions and 15 deletions

View File

@@ -1,5 +1,8 @@
#!/bin/bash -x
# Do this so that the nodepool commands below can find the
# clouds.yaml file
export OS_CLIENT_CONFIG_FILE=${OS_CLIENT_CONFIG_FILE:-/opt/stack/new/.config/openstack/clouds.yaml}
NODEPOOL_CONFIG=${NODEPOOL_CONFIG:-/etc/nodepool/nodepool.yaml}
NODEPOOL="nodepool -c $NODEPOOL_CONFIG"
@@ -8,11 +11,11 @@ function waitforimage {
state='ready'
while ! $NODEPOOL image-list | grep $name | grep $state; do
$NODEPOOL image-list > /tmp/.nodepool-image-list.txt
$NODEPOOL list > /tmp/.nodepool-list.txt
sudo mv /tmp/.nodepool-image-list.txt $WORKSPACE/logs/nodepool-image-list.txt
sudo mv /tmp/.nodepool-list.txt $WORKSPACE/logs/nodepool-list.txt
sleep 10
$NODEPOOL image-list > /tmp/.nodepool-image-list.txt
$NODEPOOL list > /tmp/.nodepool-list.txt
sudo mv /tmp/.nodepool-image-list.txt $WORKSPACE/logs/nodepool-image-list.txt
sudo mv /tmp/.nodepool-list.txt $WORKSPACE/logs/nodepool-list.txt
sleep 10
done
}
@@ -21,11 +24,11 @@ function waitfornode {
state='ready'
while ! $NODEPOOL list | grep $name | grep $state; do
$NODEPOOL image-list > /tmp/.nodepool-image-list.txt
$NODEPOOL list > /tmp/.nodepool-list.txt
sudo mv /tmp/.nodepool-image-list.txt $WORKSPACE/logs/nodepool-image-list.txt
sudo mv /tmp/.nodepool-list.txt $WORKSPACE/logs/nodepool-list.txt
sleep 10
$NODEPOOL image-list > /tmp/.nodepool-image-list.txt
$NODEPOOL list > /tmp/.nodepool-list.txt
sudo mv /tmp/.nodepool-image-list.txt $WORKSPACE/logs/nodepool-image-list.txt
sudo mv /tmp/.nodepool-list.txt $WORKSPACE/logs/nodepool-list.txt
sleep 10
done
}