#process options
source ${DIRNAME}/get-options.sh "force:f delete:d delete-all port:p= admin-port:P= screen-name= help:h dbname= insert-bashrc" $* || $_exit 1
-
#check correct arguments
action_list=""
for param in $params
do
if [[ "$param" == reset ]] || [[ "$param" == create ]] || [[ "$param" == delete ]] || [[ "$param" == delete-all ]]
then
- action_list="$action_list $argument"
+ action_list="$action_list $param"
continue
else
echo "invalid argument '$param'? Type -h for help" >&2 && $_exit 1
${DIRvim}/openvim host-remove -f fake-host-1 || echo "fail"
${DIRvim}/openvim host-remove -f fake-host-2 || echo "fail"
${DIRvim}/openvim host-remove -f fake-host-3 || echo "fail"
- result=`openvim tenant-list TEST-admin`
+ result=`openvim tenant-list osm`
vimtenant=`echo $result |gawk '{print $1}'`
#check a valid uuid is obtained
- is_valid_uuid $vimtenant || ! echo "Tenant TEST-admin not found. Already delete?" >&2 || $_exit 1
+ is_valid_uuid $vimtenant || ! echo "Tenant 'osm' not found. Already delete?" >&2 || $_exit 1
export OPENVIM_TENANT=$vimtenant
- ${DIRvim}/openvim tenant-delete -f TEST-admin || echo "fail"
+ ${DIRvim}/openvim tenant-delete -f osm || echo "fail"
echo
elif [[ $action == "create" ]]
${DIRvim}/openvim net-create $DIRvim/test/networks/net-example2.yaml || ! echo "fail" >&2 || $_exit 1
${DIRvim}/openvim net-create $DIRvim/test/networks/net-example3.yaml || ! echo "fail" >&2 || $_exit 1
- printf "%-50s" "Creating openvim tenant 'TEST-admin': "
- result=`openvim tenant-create '{"tenant": {"name":"TEST-admin", "description":"admin"}}'`
+ printf "%-50s" "Creating openvim tenant 'osm': "
+ result=`openvim tenant-create '{tenant: {name: osm, description: admin}}'`
vimtenant=`echo $result |gawk '{print $1}'`
#check a valid uuid is obtained
! is_valid_uuid $vimtenant && echo "FAIL" && echo " $result" && $_exit 1