Standarizing CONFIG and RESOURCES 09/13409/1
authorDan Radez <dradez@redhat.com>
Thu, 28 Apr 2016 22:24:42 +0000 (18:24 -0400)
committerDan Radez <dradez@redhat.com>
Thu, 28 Apr 2016 22:24:42 +0000 (18:24 -0400)
- first stage in standarizing how custom config
  values are passed in by moving
  to using ENV vars to pass in custom params

- next stage is to remove the -r and -c
  options in deploy.sh

Moving this direction will reduce managment of
custom parameters and rely on ENV vars to make
the customizations for development

Change-Id: Ibbc171d5e6801b27c1b62ca65c2a9f7830483b97
Signed-off-by: Dan Radez <dradez@redhat.com>
ci/clean.sh
ci/deploy.sh
ci/util.sh

index dc76f32..4209006 100755 (executable)
@@ -13,7 +13,7 @@
 #author: Tim Rozet (trozet@redhat.com)
 
 # Use default if no param passed
-CONFIG=${1-"/var/opt/opnfv"}
+CONFIG=${CONFIG:-'/var/opt/opnfv'}
 
 ##LIBRARIES
 source $CONFIG/lib/common-functions.sh
index a9a9509..ebcde33 100755 (executable)
@@ -38,8 +38,8 @@ declare -A NET_MAP
 
 SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)
 DEPLOY_OPTIONS=""
-RESOURCES=/var/opt/opnfv/images
-CONFIG=/var/opt/opnfv
+RESOURCES=${RESOURCES:-'/var/opt/opnfv/images'}
+CONFIG=${CONFIG:-'/var/opt/opnfv'}
 OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network"
 # Netmap used to map networks to OVS bridge names
 NET_MAP['admin_network']="br-admin"
index 4f79545..3e50d96 100644 (file)
@@ -2,7 +2,7 @@
 # Utility script used to interact with a deployment
 # @author Tim Rozet (trozet@redhat.com)
 
-CONFIG=/var/opt/opnfv
+CONFIG=${CONFIG:-'/var/opt/opnfv'}
 VALID_CMDS="undercloud debug-stack -h --help"
 
 source $CONFIG/utility-functions.sh
@@ -72,4 +72,4 @@ main() {
   parse_cmdline "$@"
 }
 
-main "$@"
\ No newline at end of file
+main "$@"