Skip to content

Commit

Permalink
Closes-Bug: #1503868, SM-Lite should have an option to take the domai…
Browse files Browse the repository at this point in the history
…n name

Change-Id: Idf589bbf1a32b98b8fb208a83eb575aae912c8c3
  • Loading branch information
miriyalar committed Oct 20, 2015
1 parent 2326328 commit a9b5359
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ start_time=$(date +"%s")

SOURCES_LIST="sources_list"
TESTBED="testbed.py"
DEFAULT_DOMAIN=""
CONTRAIL_PKG=""
INSTALL_SM_LITE="install_sm_lite"
CLEANUP_PUPPET_AGENT=""
Expand All @@ -30,6 +31,7 @@ function usage()
echo -e "\t-h --help"
echo -e "\t-c|--contrail-package <pkg>"
echo -e "\t-t|--testbed <testbed.py>"
echo -e "\t-d|--default-domain <domain name>"
echo -e "\t-ni|--no-install-sm-lite"
echo -e "\t-cp|--cleanup-puppet-agent"
echo -e "\t-nr|--no-local-repo"
Expand Down Expand Up @@ -57,6 +59,10 @@ case $key in
TESTBED="$2"
shift # past argument
;;
-d|--default-domain)
DEFAULT_DOMAIN="$2"
shift # past argument
;;
-nr|--no-local-repo)
NO_LOCAL_REPO=0
;;
Expand Down Expand Up @@ -195,6 +201,9 @@ if [[ $LOCAL_REPO_MOUNTED -eq 1 ]]; then
fi

echo "$arrow Adding server manager objects to server manager database"
if [ "$DEFAULT_DOMAIN" != "" ] && [ -f /opt/contrail/server_manager/client/sm-client-config.ini ]; then
sed -i "s|domain =.*|domain = ${DEFAULT_DOMAIN}|g" /opt/contrail/server_manager/client/sm-client-config.ini
fi
# Create package, cluster, server objects
server-manager add image -f image.json
server-manager add cluster -f cluster.json
Expand Down

0 comments on commit a9b5359

Please sign in to comment.