Browse code

Merge "Small Refactors"

Jenkins authored on 2013/03/15 06:12:21
Showing 2 changed files
... ...
@@ -20,13 +20,13 @@ if [ ! -e ../../localrc ]; then
20 20
 fi
21 21
 
22 22
 # This directory
23
-TOP_DIR=$(cd $(dirname "$0") && pwd)
23
+THIS_DIR=$(cd $(dirname "$0") && pwd)
24 24
 
25 25
 # Source lower level functions
26
-. $TOP_DIR/../../functions
26
+. $THIS_DIR/../../functions
27 27
 
28 28
 # Include onexit commands
29
-. $TOP_DIR/scripts/on_exit.sh
29
+. $THIS_DIR/scripts/on_exit.sh
30 30
 
31 31
 
32 32
 #
... ...
@@ -49,7 +49,7 @@ xe_min()
49 49
 # including installing XenAPI plugins
50 50
 #
51 51
 
52
-cd $TOP_DIR
52
+cd $THIS_DIR
53 53
 if [ -f ./master ]
54 54
 then
55 55
     rm -rf ./master
... ...
@@ -271,7 +271,7 @@ if [ -z "$templateuuid" ]; then
271 271
             HTTP_SERVER_LOCATION="/var/www/html"
272 272
             mkdir -p $HTTP_SERVER_LOCATION
273 273
         fi
274
-        cp -f $TOP_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
274
+        cp -f $THIS_DIR/devstackubuntupreseed.cfg $HTTP_SERVER_LOCATION
275 275
         MIRROR=${MIRROR:-""}
276 276
         if [ -n "$MIRROR" ]; then
277 277
             sed -e "s,d-i mirror/http/hostname string .*,d-i mirror/http/hostname string $MIRROR," \
... ...
@@ -280,11 +280,11 @@ if [ -z "$templateuuid" ]; then
280 280
     fi
281 281
 
282 282
     # Update the template
283
-    $TOP_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
283
+    $THIS_DIR/scripts/install_ubuntu_template.sh $PRESEED_URL
284 284
 
285 285
     # create a new VM with the given template
286 286
     # creating the correct VIFs and metadata
287
-    $TOP_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
287
+    $THIS_DIR/scripts/install-os-vpx.sh -t "$UBUNTU_INST_TEMPLATE_NAME" -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -r $OSDOMU_MEM_MB -k "flat_network_bridge=${VM_BR}"
288 288
 
289 289
     # wait for install to finish
290 290
     wait_for_VM_to_halt
... ...
@@ -298,7 +298,7 @@ if [ -z "$templateuuid" ]; then
298 298
     #
299 299
 
300 300
     # Install XenServer tools, and other such things
301
-    $TOP_DIR/prepare_guest_template.sh "$GUEST_NAME"
301
+    $THIS_DIR/prepare_guest_template.sh "$GUEST_NAME"
302 302
 
303 303
     # start the VM to run the prepare steps
304 304
     xe vm-start vm="$GUEST_NAME"
... ...
@@ -320,7 +320,7 @@ fi
320 320
 #
321 321
 # Inject DevStack inside VM disk
322 322
 #
323
-$TOP_DIR/build_xva.sh "$GUEST_NAME"
323
+$THIS_DIR/build_xva.sh "$GUEST_NAME"
324 324
 
325 325
 # create a snapshot before the first boot
326 326
 # to allow a quick re-run with the same settings
... ...
@@ -32,10 +32,10 @@ MGT_IP=${MGT_IP:-172.16.100.55}
32 32
 PUB_IP=${PUB_IP:-192.168.1.55}
33 33
 
34 34
 # Public network
35
+PUB_NETMASK=${PUB_NETMASK:-255.255.255.0}
35 36
 PUB_BR=${PUB_BR:-"xenbr0"}
36
-PUB_DEV=${PUB_DEV:-eth0}
37 37
 PUB_VLAN=${PUB_VLAN:--1}
38
-PUB_NETMASK=${PUB_NETMASK:-255.255.255.0}
38
+PUB_DEV=${PUB_DEV:-eth0}
39 39
 
40 40
 # VM network params
41 41
 VM_NETMASK=${VM_NETMASK:-255.255.255.0}