Browse code

Install Ironic client

Since python-ironicclient was published to github it's
reasonable to include it to the default Ironic set up.

Change-Id: Id1d0209959a3b482977b5e710c0885c714ad7e10

Roman Prykhodchenko authored on 2013/10/15 23:03:15
Showing 3 changed files
... ...
@@ -11,6 +11,7 @@
11 11
 # ``stack.sh`` calls the entry points in this order:
12 12
 #
13 13
 # install_ironic
14
+# install_ironicclient
14 15
 # configure_ironic
15 16
 # init_ironic
16 17
 # start_ironic
... ...
@@ -27,6 +28,7 @@ set +o xtrace
27 27
 
28 28
 # Set up default directories
29 29
 IRONIC_DIR=$DEST/ironic
30
+IRONICCLIENT_DIR=$DEST/python-ironicclient
30 31
 IRONIC_AUTH_CACHE_DIR=${IRONIC_AUTH_CACHE_DIR:-/var/cache/ironic}
31 32
 IRONIC_CONF_DIR=${IRONIC_CONF_DIR:-/etc/ironic}
32 33
 IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
... ...
@@ -45,6 +47,18 @@ IRONIC_HOSTPORT=${IRONIC_HOSTPORT:-$SERVICE_HOST:6385}
45 45
 # Functions
46 46
 # ---------
47 47
 
48
+# install_ironic() - Collect source and prepare
49
+function install_ironic() {
50
+    git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
51
+    setup_develop $IRONIC_DIR
52
+}
53
+
54
+# install_ironicclient() - Collect sources and prepare
55
+function install_ironicclient() {
56
+    git_clone $IRONICCLIENT_REPO $IRONICCLIENT_DIR $IRONICCLIENT_BRANCH
57
+    setup_develop $IRONICCLIENT_DIR
58
+}
59
+
48 60
 # cleanup_ironic() - Remove residual data files, anything left over from previous
49 61
 # runs that would need to clean up.
50 62
 function cleanup_ironic() {
... ...
@@ -170,12 +184,6 @@ function init_ironic() {
170 170
     create_ironic_accounts
171 171
 }
172 172
 
173
-# install_ironic() - Collect source and prepare
174
-function install_ironic() {
175
-    git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
176
-    setup_develop $IRONIC_DIR
177
-}
178
-
179 173
 # start_ironic() - Start running processes, including screen
180 174
 function start_ironic() {
181 175
     # Start Ironic API server, if enabled.
... ...
@@ -722,6 +722,7 @@ fi
722 722
 
723 723
 if is_service_enabled ir-api ir-cond; then
724 724
     install_ironic
725
+    install_ironicclient
725 726
     configure_ironic
726 727
 fi
727 728
 
... ...
@@ -104,6 +104,10 @@ HORIZON_BRANCH=${HORIZON_BRANCH:-master}
104 104
 IRONIC_REPO=${IRONIC_REPO:-${GIT_BASE}/openstack/ironic.git}
105 105
 IRONIC_BRANCH=${IRONIC_BRANCH:-master}
106 106
 
107
+# ironic client
108
+IRONICCLIENT_REPO=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
109
+IRONICCLIENT_BRANCH=${IRONICCLIENT_BRANCH:-master}
110
+
107 111
 # unified auth system (manages accounts/tokens)
108 112
 KEYSTONE_REPO=${KEYSTONE_REPO:-${GIT_BASE}/openstack/keystone.git}
109 113
 KEYSTONE_BRANCH=${KEYSTONE_BRANCH:-master}