Browse code

Move setup_develop call

Move setup_develop() call into the install_XXX() function as the
distinction has no real purpose. This eliminates the configure_XXXclient()
function for Nova and Swift.

Also create install_cinderclient() as we will need it to handle dependencies
in a followup patch.

Chasing down another #$^%&&^^^$%%#$ prettytable version pin

Change-Id: I61d761bc57a31caf2ed0ade326ab236eb2bb7358

Dean Troyer authored on 2013/04/02 08:23:22
Showing 4 changed files
... ...
@@ -365,7 +365,10 @@ function init_cinder() {
365 365
 function install_cinder() {
366 366
     git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
367 367
     setup_develop $CINDER_DIR
368
+}
368 369
 
370
+# install_cinderclient() - Collect source and prepare
371
+function install_cinderclient() {
369 372
     git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
370 373
     setup_develop $CINDERCLIENT_DIR
371 374
 }
... ...
@@ -169,11 +169,6 @@ function cleanup_nova() {
169 169
     sudo rm -rf $NOVA_STATE_PATH $NOVA_AUTH_CACHE_DIR
170 170
 }
171 171
 
172
-# configure_novaclient() - Set config files, create data dirs, etc
173
-function configure_novaclient() {
174
-    setup_develop $NOVACLIENT_DIR
175
-}
176
-
177 172
 # configure_nova_rootwrap() - configure Nova's rootwrap
178 173
 function configure_nova_rootwrap() {
179 174
     # Deploy new rootwrap filters files (owned by root).
... ...
@@ -204,8 +199,6 @@ function configure_nova_rootwrap() {
204 204
 
205 205
 # configure_nova() - Set config files, create data dirs, etc
206 206
 function configure_nova() {
207
-    setup_develop $NOVA_DIR
208
-
209 207
     # Put config files in ``/etc/nova`` for everyone to find
210 208
     if [[ ! -d $NOVA_CONF_DIR ]]; then
211 209
         sudo mkdir -p $NOVA_CONF_DIR
... ...
@@ -597,6 +590,7 @@ function init_nova() {
597 597
 # install_novaclient() - Collect source and prepare
598 598
 function install_novaclient() {
599 599
     git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
600
+    setup_develop $NOVACLIENT_DIR
600 601
 }
601 602
 
602 603
 # install_nova() - Collect source and prepare
... ...
@@ -627,6 +621,7 @@ function install_nova() {
627 627
     fi
628 628
 
629 629
     git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH
630
+    setup_develop $NOVA_DIR
630 631
 }
631 632
 
632 633
 # start_nova_api() - Start the API process ahead of other things
... ...
@@ -106,8 +106,6 @@ function configure_swift() {
106 106
     local swift_node_config
107 107
     local swift_log_dir
108 108
 
109
-    setup_develop $SWIFT_DIR
110
-
111 109
     # Make sure to kill all swift processes first
112 110
     swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
113 111
 
... ...
@@ -281,11 +279,6 @@ EOF
281 281
         tee /etc/rsyslog.d/10-swift.conf
282 282
 }
283 283
 
284
-# configure_swiftclient() - Set config files, create data dirs, etc
285
-function configure_swiftclient() {
286
-    setup_develop $SWIFTCLIENT_DIR
287
-}
288
-
289 284
 # create_swift_disk - Create Swift backing disk
290 285
 function create_swift_disk() {
291 286
     local node_number
... ...
@@ -374,13 +367,14 @@ function init_swift() {
374 374
 
375 375
 function install_swift() {
376 376
     git_clone $SWIFT_REPO $SWIFT_DIR $SWIFT_BRANCH
377
+    setup_develop $SWIFT_DIR
377 378
 }
378 379
 
379 380
 function install_swiftclient() {
380 381
     git_clone $SWIFTCLIENT_REPO $SWIFTCLIENT_DIR $SWIFTCLIENT_BRANCH
382
+    setup_develop $SWIFTCLIENT_DIR
381 383
 }
382 384
 
383
-
384 385
 # start_swift() - Start running processes, including screen
385 386
 function start_swift() {
386 387
     # (re)start rsyslog
... ...
@@ -564,9 +564,11 @@ echo_summary "Installing OpenStack project source"
564 564
 # Grab clients first
565 565
 install_keystoneclient
566 566
 install_glanceclient
567
+install_cinderclient
567 568
 install_novaclient
568 569
 # Check out the client libs that are used most
569 570
 git_clone $OPENSTACKCLIENT_REPO $OPENSTACKCLIENT_DIR $OPENSTACKCLIENT_BRANCH
571
+setup_develop $OPENSTACKCLIENT_DIR
570 572
 
571 573
 # glance, swift middleware and nova api needs keystone middleware
572 574
 if is_service_enabled key g-api n-api s-proxy; then
... ...
@@ -627,8 +629,6 @@ fi
627 627
 echo_summary "Configuring OpenStack projects"
628 628
 
629 629
 # Set up our checkouts so they are installed in the python path
630
-configure_novaclient
631
-setup_develop $OPENSTACKCLIENT_DIR
632 630
 
633 631
 if is_service_enabled key g-api n-api s-proxy; then
634 632
     configure_keystone
... ...
@@ -636,7 +636,6 @@ fi
636 636
 
637 637
 if is_service_enabled s-proxy; then
638 638
     configure_swift
639
-    configure_swiftclient
640 639
     if is_service_enabled swift3; then
641 640
         setup_develop $SWIFT3_DIR
642 641
     fi