support installing clients at released versions
expand the devstack support for libraries from released versions to
support python-* clients and tempest_lib.
Depends-On: I81b0d228e7769758c61e5b0323ecfce8c8886d39
Change-Id: I26fac0ccf8fd4818e24618d56bf04b32306f88f6
diff --git a/lib/ironic b/lib/ironic
index 0a84e47..0fadb8d 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -28,11 +28,12 @@
# --------
# Set up default directories
+GITDIR["ironicclient"]=$DEST/python-ironicclient
+
IRONIC_DIR=$DEST/ironic
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
IRONIC_DATA_DIR=$DATA_DIR/ironic
IRONIC_STATE_PATH=/var/lib/ironic
-IRONICCLIENT_DIR=$DEST/python-ironicclient
IRONIC_AUTH_CACHE_DIR=${IRONIC_AUTH_CACHE_DIR:-/var/cache/ironic}
IRONIC_CONF_DIR=${IRONIC_CONF_DIR:-/etc/ironic}
IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
@@ -150,9 +151,14 @@
# install_ironicclient() - Collect sources and prepare
function install_ironicclient {
- git_clone $IRONICCLIENT_REPO $IRONICCLIENT_DIR $IRONICCLIENT_BRANCH
- setup_develop $IRONICCLIENT_DIR
- sudo install -D -m 0644 -o $STACK_USER {$IRONICCLIENT_DIR/tools/,/etc/bash_completion.d/}ironic.bash_completion
+ if use_library_from_git "ironicclient"; then
+ git_clone_by_name "ironicclient"
+ setup_develop "ironicclient"
+ sudo install -D -m 0644 -o $STACK_USER {$IRONICCLIENT_DIR/tools/,/etc/bash_completion.d/}ironic.bash_completion
+ else
+ # nothing actually "requires" ironicclient, so force instally from pypi
+ pip_install python-ironicclient
+ fi
}
# _cleanup_ironic_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file