Skip to content

Commit 5cb1906

Browse files
committed
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
1 parent 2d18b83 commit 5cb1906

15 files changed

Lines changed: 113 additions & 71 deletions

File tree

extras.d/70-trove.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ if is_service_enabled trove; then
1111
cleanup_trove
1212
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
1313
echo_summary "Configuring Trove"
14-
configure_troveclient
1514
configure_trove
1615

1716
if is_service_enabled key; then

functions-common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,7 @@ function use_library_from_git {
16211621
return $enabled
16221622
}
16231623

1624+
16241625
# setup a library by name. If we are trying to use the library from
16251626
# git, we'll do a git based install, otherwise we'll punt and the
16261627
# library should be installed by a requirements pull from another

lib/ceilometer

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ set +o xtrace
3535
# --------
3636

3737
# Set up default directories
38+
GITDIR["ceilometerclient"]=$DEST/python-ceilometerclient
39+
3840
CEILOMETER_DIR=$DEST/ceilometer
39-
CEILOMETERCLIENT_DIR=$DEST/python-ceilometerclient
4041
CEILOMETER_CONF_DIR=/etc/ceilometer
4142
CEILOMETER_CONF=$CEILOMETER_CONF_DIR/ceilometer.conf
4243
CEILOMETER_API_LOG_DIR=/var/log/ceilometer-api
@@ -254,9 +255,11 @@ function install_ceilometer {
254255

255256
# install_ceilometerclient() - Collect source and prepare
256257
function install_ceilometerclient {
257-
git_clone $CEILOMETERCLIENT_REPO $CEILOMETERCLIENT_DIR $CEILOMETERCLIENT_BRANCH
258-
setup_develop $CEILOMETERCLIENT_DIR
259-
sudo install -D -m 0644 -o $STACK_USER {$CEILOMETERCLIENT_DIR/tools/,/etc/bash_completion.d/}ceilometer.bash_completion
258+
if use_library_from_git "ceilometerclient"; then
259+
git_clone_by_name "ceilometerclient"
260+
setup_develop "ceilometerclient"
261+
sudo install -D -m 0644 -o $STACK_USER {$CEILOMETERCLIENT_DIR/tools/,/etc/bash_completion.d/}ceilometer.bash_completion
262+
fi
260263
}
261264

262265
# start_ceilometer() - Start running processes, including screen

lib/cinder

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
3636
fi
3737

3838
# set up default directories
39+
GITDIR["cinderclient"]=$DEST/python-cinderclient
40+
3941
CINDER_DIR=$DEST/cinder
40-
CINDERCLIENT_DIR=$DEST/python-cinderclient
4142
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
4243
CINDER_AUTH_CACHE_DIR=${CINDER_AUTH_CACHE_DIR:-/var/cache/cinder}
4344

@@ -402,9 +403,11 @@ function install_cinder {
402403

403404
# install_cinderclient() - Collect source and prepare
404405
function install_cinderclient {
405-
git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
406-
setup_develop $CINDERCLIENT_DIR
407-
sudo install -D -m 0644 -o $STACK_USER {$CINDERCLIENT_DIR/tools/,/etc/bash_completion.d/}cinder.bash_completion
406+
if use_library_from_git "cinderclient"; then
407+
git_clone_by_name "cinderclient"
408+
setup_develop "cinderclient"
409+
sudo install -D -m 0644 -o $STACK_USER {$CINDERCLIENT_DIR/tools/,/etc/bash_completion.d/}cinder.bash_completion
410+
fi
408411
}
409412

410413
# apply config.d approach for cinder volumes directory

lib/glance

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ set +o xtrace
2727
# --------
2828

2929
# Set up default directories
30+
GITDIR["glanceclient"]=$DEST/python-glanceclient
31+
3032
GLANCE_DIR=$DEST/glance
3133
GLANCE_STORE_DIR=$DEST/glance_store
32-
GLANCECLIENT_DIR=$DEST/python-glanceclient
3334
GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache}
3435
GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images}
3536
GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance}
@@ -286,8 +287,10 @@ function init_glance {
286287

287288
# install_glanceclient() - Collect source and prepare
288289
function install_glanceclient {
289-
git_clone $GLANCECLIENT_REPO $GLANCECLIENT_DIR $GLANCECLIENT_BRANCH
290-
setup_develop $GLANCECLIENT_DIR
290+
if use_library_from_git "glanceclient"; then
291+
git_clone_by_name "glanceclient"
292+
setup_develop "glanceclient"
293+
fi
291294
}
292295

293296
# install_glance() - Collect source and prepare

lib/heat

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ set +o xtrace
2929
# --------
3030

3131
# set up default directories
32+
GITDIR["heatclient"]=$DEST/python-heatclient
33+
3234
HEAT_DIR=$DEST/heat
33-
HEATCLIENT_DIR=$DEST/python-heatclient
3435
HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools
3536
HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates
3637
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
@@ -183,9 +184,11 @@ function create_heat_cache_dir {
183184

184185
# install_heatclient() - Collect source and prepare
185186
function install_heatclient {
186-
git_clone $HEATCLIENT_REPO $HEATCLIENT_DIR $HEATCLIENT_BRANCH
187-
setup_develop $HEATCLIENT_DIR
188-
sudo install -D -m 0644 -o $STACK_USER {$HEATCLIENT_DIR/tools/,/etc/bash_completion.d/}heat.bash_completion
187+
if use_library_from_git "heatclient"; then
188+
git_clone_by_name "heatclient"
189+
setup_develop "heatclient"
190+
sudo install -D -m 0644 -o $STACK_USER {$HEATCLIENT_DIR/tools/,/etc/bash_completion.d/}heat.bash_completion
191+
fi
189192
}
190193

191194
# install_heat() - Collect source and prepare

lib/ironic

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ set +o pipefail
2828
# --------
2929

3030
# Set up default directories
31+
GITDIR["ironicclient"]=$DEST/python-ironicclient
32+
3133
IRONIC_DIR=$DEST/ironic
3234
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
3335
IRONIC_DATA_DIR=$DATA_DIR/ironic
3436
IRONIC_STATE_PATH=/var/lib/ironic
35-
IRONICCLIENT_DIR=$DEST/python-ironicclient
3637
IRONIC_AUTH_CACHE_DIR=${IRONIC_AUTH_CACHE_DIR:-/var/cache/ironic}
3738
IRONIC_CONF_DIR=${IRONIC_CONF_DIR:-/etc/ironic}
3839
IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
@@ -150,9 +151,14 @@ function install_ironic {
150151

151152
# install_ironicclient() - Collect sources and prepare
152153
function install_ironicclient {
153-
git_clone $IRONICCLIENT_REPO $IRONICCLIENT_DIR $IRONICCLIENT_BRANCH
154-
setup_develop $IRONICCLIENT_DIR
155-
sudo install -D -m 0644 -o $STACK_USER {$IRONICCLIENT_DIR/tools/,/etc/bash_completion.d/}ironic.bash_completion
154+
if use_library_from_git "ironicclient"; then
155+
git_clone_by_name "ironicclient"
156+
setup_develop "ironicclient"
157+
sudo install -D -m 0644 -o $STACK_USER {$IRONICCLIENT_DIR/tools/,/etc/bash_completion.d/}ironic.bash_completion
158+
else
159+
# nothing actually "requires" ironicclient, so force instally from pypi
160+
pip_install python-ironicclient
161+
fi
156162
}
157163

158164
# _cleanup_ironic_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file

lib/keystone

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ set +o xtrace
3333
# --------
3434

3535
# Set up default directories
36+
GITDIR["keystoneclient"]=$DEST/python-keystoneclient
37+
3638
KEYSTONE_DIR=$DEST/keystone
3739
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
3840
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
@@ -45,7 +47,6 @@ else
4547
fi
4648

4749
KEYSTONEMIDDLEWARE_DIR=$DEST/keystonemiddleware
48-
KEYSTONECLIENT_DIR=$DEST/python-keystoneclient
4950

5051
# Set up additional extensions, such as oauth1, federation
5152
# Example of KEYSTONE_EXTENSIONS=oauth1,federation
@@ -479,9 +480,11 @@ function init_keystone {
479480

480481
# install_keystoneclient() - Collect source and prepare
481482
function install_keystoneclient {
482-
git_clone $KEYSTONECLIENT_REPO $KEYSTONECLIENT_DIR $KEYSTONECLIENT_BRANCH
483-
setup_develop $KEYSTONECLIENT_DIR
484-
sudo install -D -m 0644 -o $STACK_USER {$KEYSTONECLIENT_DIR/tools/,/etc/bash_completion.d/}keystone.bash_completion
483+
if use_library_from_git "keystoneclient"; then
484+
git_clone_by_name "keystoneclient"
485+
setup_develop "keystoneclient"
486+
sudo install -D -m 0644 -o $STACK_USER {$KEYSTONECLIENT_DIR/tools/,/etc/bash_completion.d/}keystone.bash_completion
487+
fi
485488
}
486489

487490
# install_keystonemiddleware() - Collect source and prepare

lib/neutron

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ fi
7777

7878

7979
# Set up default directories
80+
GITDIR["neutronclient"]=$DEST/python-neutronclient
81+
82+
8083
NEUTRON_DIR=$DEST/neutron
81-
NEUTRONCLIENT_DIR=$DEST/python-neutronclient
8284
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
8385

8486
# Support entry points installation of console scripts
@@ -601,9 +603,11 @@ function install_neutron {
601603

602604
# install_neutronclient() - Collect source and prepare
603605
function install_neutronclient {
604-
git_clone $NEUTRONCLIENT_REPO $NEUTRONCLIENT_DIR $NEUTRONCLIENT_BRANCH
605-
setup_develop $NEUTRONCLIENT_DIR
606-
sudo install -D -m 0644 -o $STACK_USER {$NEUTRONCLIENT_DIR/tools/,/etc/bash_completion.d/}neutron.bash_completion
606+
if use_library_from_git "neutronclient"; then
607+
git_clone_by_name "neutronclient"
608+
setup_develop "neutronclient"
609+
sudo install -D -m 0644 -o $STACK_USER {$NEUTRONCLIENT_DIR/tools/,/etc/bash_completion.d/}neutron.bash_completion
610+
fi
607611
}
608612

609613
# install_neutron_agent_packages() - Collect source and prepare

lib/nova

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ set +o xtrace
2929
# --------
3030

3131
# Set up default directories
32+
GITDIR["novaclient"]=$DEST/python-novaclient
33+
34+
3235
NOVA_DIR=$DEST/nova
33-
NOVACLIENT_DIR=$DEST/python-novaclient
3436
NOVA_STATE_PATH=${NOVA_STATE_PATH:=$DATA_DIR/nova}
3537
# INSTANCES_PATH is the previous name for this
3638
NOVA_INSTANCES_PATH=${NOVA_INSTANCES_PATH:=${INSTANCES_PATH:=$NOVA_STATE_PATH/instances}}
@@ -637,9 +639,11 @@ function init_nova {
637639

638640
# install_novaclient() - Collect source and prepare
639641
function install_novaclient {
640-
git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
641-
setup_develop $NOVACLIENT_DIR
642-
sudo install -D -m 0644 -o $STACK_USER {$NOVACLIENT_DIR/tools/,/etc/bash_completion.d/}nova.bash_completion
642+
if use_library_from_git "novaclient"; then
643+
git_clone_by_name "novaclient"
644+
setup_develop "novaclient"
645+
sudo install -D -m 0644 -o $STACK_USER {$NOVACLIENT_DIR/tools/,/etc/bash_completion.d/}nova.bash_completion
646+
fi
643647
}
644648

645649
# install_nova() - Collect source and prepare

0 commit comments

Comments
 (0)