c0358d0bd5
Change-Id: I5d6d0c587b65e0ca877a4d13c89c4cd6ac90ef50
31 lines
671 B
Bash
Executable File
31 lines
671 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# NOTE(thowe): There are some issues with OCC envvars that force us to do
|
|
# this for now.
|
|
#
|
|
mkdir -p ~/.config/openstack/
|
|
FILE=~/.config/openstack/clouds.yaml
|
|
echo 'clouds:' >$FILE
|
|
echo ' test_cloud:' >>$FILE
|
|
env | grep OS_ | tr '=' ' ' | while read k v
|
|
do
|
|
k=$(echo $k | sed -e 's/OS_//')
|
|
k=$(echo $k | tr '[A-Z]' '[a-z]')
|
|
case "$k" in
|
|
region_name|*_api_version)
|
|
echo " $k: $v" >>$FILE
|
|
esac
|
|
done
|
|
echo " auth:" >>$FILE
|
|
env | grep OS_ | tr '=' ' ' | while read k v
|
|
do
|
|
k=$(echo $k | sed -e 's/OS_//')
|
|
k=$(echo $k | tr '[A-Z]' '[a-z]')
|
|
case "$k" in
|
|
region_name|*_api_version)
|
|
;;
|
|
*)
|
|
echo " $k: $v" >>$FILE
|
|
esac
|
|
done
|