fix python-* lib from git installation

We're using all the magic variables based on python-fooclient, however
all the inline code was using fooclient for variables. So we had a
mismatch, which was kindly pointed out by some of the 3rd party ci
testers.

Change-Id: I27a56222c7e8e610fba8bf97672d2a42f5cf14ca
This commit is contained in:
Sean Dague 2014-11-13 17:09:28 -05:00
parent 94f8bea9e4
commit e08ab104e6
13 changed files with 84 additions and 74 deletions

View File

@ -1615,7 +1615,6 @@ function use_library_from_git {
return $enabled return $enabled
} }
# setup a library by name. If we are trying to use the library from # setup a library by name. If we are trying to use the library from
# git, we'll do a git based install, otherwise we'll punt and the # git, we'll do a git based install, otherwise we'll punt and the
# library should be installed by a requirements pull from another # library should be installed by a requirements pull from another
@ -1626,6 +1625,17 @@ function setup_lib {
setup_install $dir setup_install $dir
} }
# setup a library by name in editiable mode. If we are trying to use
# the library from git, we'll do a git based install, otherwise we'll
# punt and the library should be installed by a requirements pull from
# another project.
#
# use this for non namespaced libraries
function setup_dev_lib {
local name=$1
local dir=${GITDIR[$name]}
setup_develop $dir
}
# this should be used if you want to install globally, all libraries should # this should be used if you want to install globally, all libraries should
# use this, especially *oslo* ones # use this, especially *oslo* ones

View File

@ -35,7 +35,7 @@ set +o xtrace
# -------- # --------
# Set up default directories # Set up default directories
GITDIR["ceilometerclient"]=$DEST/python-ceilometerclient GITDIR["python-ceilometerclient"]=$DEST/python-ceilometerclient
CEILOMETER_DIR=$DEST/ceilometer CEILOMETER_DIR=$DEST/ceilometer
CEILOMETER_CONF_DIR=/etc/ceilometer CEILOMETER_CONF_DIR=/etc/ceilometer
@ -269,10 +269,10 @@ function install_ceilometer {
# install_ceilometerclient() - Collect source and prepare # install_ceilometerclient() - Collect source and prepare
function install_ceilometerclient { function install_ceilometerclient {
if use_library_from_git "ceilometerclient"; then if use_library_from_git "python-ceilometerclient"; then
git_clone_by_name "ceilometerclient" git_clone_by_name "python-ceilometerclient"
setup_develop "ceilometerclient" setup_dev_lib "python-ceilometerclient"
sudo install -D -m 0644 -o $STACK_USER {$CEILOMETERCLIENT_DIR/tools/,/etc/bash_completion.d/}ceilometer.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ceilometerclient"]}/tools/,/etc/bash_completion.d/}ceilometer.bash_completion
fi fi
} }

View File

@ -36,7 +36,7 @@ if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
fi fi
# set up default directories # set up default directories
GITDIR["cinderclient"]=$DEST/python-cinderclient GITDIR["python-cinderclient"]=$DEST/python-cinderclient
CINDER_DIR=$DEST/cinder CINDER_DIR=$DEST/cinder
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder} CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
@ -403,10 +403,10 @@ function install_cinder {
# install_cinderclient() - Collect source and prepare # install_cinderclient() - Collect source and prepare
function install_cinderclient { function install_cinderclient {
if use_library_from_git "cinderclient"; then if use_library_from_git "python-cinderclient"; then
git_clone_by_name "cinderclient" git_clone_by_name "python-cinderclient"
setup_develop "cinderclient" setup_dev_lib "python-cinderclient"
sudo install -D -m 0644 -o $STACK_USER {$CINDERCLIENT_DIR/tools/,/etc/bash_completion.d/}cinder.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-cinderclient"]}/tools/,/etc/bash_completion.d/}cinder.bash_completion
fi fi
} }

View File

@ -27,7 +27,7 @@ set +o xtrace
# -------- # --------
# Set up default directories # Set up default directories
GITDIR["glanceclient"]=$DEST/python-glanceclient GITDIR["python-glanceclient"]=$DEST/python-glanceclient
GLANCE_DIR=$DEST/glance GLANCE_DIR=$DEST/glance
GLANCE_STORE_DIR=$DEST/glance_store GLANCE_STORE_DIR=$DEST/glance_store
@ -287,9 +287,9 @@ function init_glance {
# install_glanceclient() - Collect source and prepare # install_glanceclient() - Collect source and prepare
function install_glanceclient { function install_glanceclient {
if use_library_from_git "glanceclient"; then if use_library_from_git "python-glanceclient"; then
git_clone_by_name "glanceclient" git_clone_by_name "python-glanceclient"
setup_develop "glanceclient" setup_dev_lib "python-glanceclient"
fi fi
} }

View File

@ -29,7 +29,7 @@ set +o xtrace
# -------- # --------
# set up default directories # set up default directories
GITDIR["heatclient"]=$DEST/python-heatclient GITDIR["python-heatclient"]=$DEST/python-heatclient
HEAT_DIR=$DEST/heat HEAT_DIR=$DEST/heat
HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools
@ -184,10 +184,10 @@ function create_heat_cache_dir {
# install_heatclient() - Collect source and prepare # install_heatclient() - Collect source and prepare
function install_heatclient { function install_heatclient {
if use_library_from_git "heatclient"; then if use_library_from_git "python-heatclient"; then
git_clone_by_name "heatclient" git_clone_by_name "python-heatclient"
setup_develop "heatclient" setup_dev_lib "python-heatclient"
sudo install -D -m 0644 -o $STACK_USER {$HEATCLIENT_DIR/tools/,/etc/bash_completion.d/}heat.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-heatclient"]}/tools/,/etc/bash_completion.d/}heat.bash_completion
fi fi
} }

View File

@ -28,7 +28,7 @@ set +o pipefail
# -------- # --------
# Set up default directories # Set up default directories
GITDIR["ironicclient"]=$DEST/python-ironicclient GITDIR["python-ironicclient"]=$DEST/python-ironicclient
IRONIC_DIR=$DEST/ironic IRONIC_DIR=$DEST/ironic
IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent IRONIC_PYTHON_AGENT_DIR=$DEST/ironic-python-agent
@ -151,10 +151,10 @@ function install_ironic {
# install_ironicclient() - Collect sources and prepare # install_ironicclient() - Collect sources and prepare
function install_ironicclient { function install_ironicclient {
if use_library_from_git "ironicclient"; then if use_library_from_git "python-ironicclient"; then
git_clone_by_name "ironicclient" git_clone_by_name "python-ironicclient"
setup_develop "ironicclient" setup_dev_lib "python-ironicclient"
sudo install -D -m 0644 -o $STACK_USER {$IRONICCLIENT_DIR/tools/,/etc/bash_completion.d/}ironic.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-ironicclient"]}/tools/,/etc/bash_completion.d/}ironic.bash_completion
else else
# nothing actually "requires" ironicclient, so force instally from pypi # nothing actually "requires" ironicclient, so force instally from pypi
pip_install python-ironicclient pip_install python-ironicclient

View File

@ -33,7 +33,7 @@ set +o xtrace
# -------- # --------
# Set up default directories # Set up default directories
GITDIR["keystoneclient"]=$DEST/python-keystoneclient GITDIR["python-keystoneclient"]=$DEST/python-keystoneclient
KEYSTONE_DIR=$DEST/keystone KEYSTONE_DIR=$DEST/keystone
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone} KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
@ -480,10 +480,10 @@ function init_keystone {
# install_keystoneclient() - Collect source and prepare # install_keystoneclient() - Collect source and prepare
function install_keystoneclient { function install_keystoneclient {
if use_library_from_git "keystoneclient"; then if use_library_from_git "python-keystoneclient"; then
git_clone_by_name "keystoneclient" git_clone_by_name "python-keystoneclient"
setup_develop "keystoneclient" setup_dev_lib "python-keystoneclient"
sudo install -D -m 0644 -o $STACK_USER {$KEYSTONECLIENT_DIR/tools/,/etc/bash_completion.d/}keystone.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-keystoneclient"]}/tools/,/etc/bash_completion.d/}keystone.bash_completion
fi fi
} }

View File

@ -67,7 +67,7 @@ fi
# Set up default directories # Set up default directories
GITDIR["neutronclient"]=$DEST/python-neutronclient GITDIR["python-neutronclient"]=$DEST/python-neutronclient
NEUTRON_DIR=$DEST/neutron NEUTRON_DIR=$DEST/neutron
@ -620,10 +620,10 @@ function install_neutron {
# install_neutronclient() - Collect source and prepare # install_neutronclient() - Collect source and prepare
function install_neutronclient { function install_neutronclient {
if use_library_from_git "neutronclient"; then if use_library_from_git "python-neutronclient"; then
git_clone_by_name "neutronclient" git_clone_by_name "python-neutronclient"
setup_develop "neutronclient" setup_dev_lib "python-neutronclient"
sudo install -D -m 0644 -o $STACK_USER {$NEUTRONCLIENT_DIR/tools/,/etc/bash_completion.d/}neutron.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-neutronclient"]}/tools/,/etc/bash_completion.d/}neutron.bash_completion
fi fi
} }

View File

@ -29,7 +29,7 @@ set +o xtrace
# -------- # --------
# Set up default directories # Set up default directories
GITDIR["novaclient"]=$DEST/python-novaclient GITDIR["python-novaclient"]=$DEST/python-novaclient
NOVA_DIR=$DEST/nova NOVA_DIR=$DEST/nova
@ -639,10 +639,10 @@ function init_nova {
# install_novaclient() - Collect source and prepare # install_novaclient() - Collect source and prepare
function install_novaclient { function install_novaclient {
if use_library_from_git "novaclient"; then if use_library_from_git "python-novaclient"; then
git_clone_by_name "novaclient" git_clone_by_name "python-novaclient"
setup_develop "novaclient" setup_dev_lib "python-novaclient"
sudo install -D -m 0644 -o $STACK_USER {$NOVACLIENT_DIR/tools/,/etc/bash_completion.d/}nova.bash_completion sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-novaclient"]}/tools/,/etc/bash_completion.d/}nova.bash_completion
fi fi
} }

View File

@ -34,7 +34,7 @@ if is_ssl_enabled_service "s-proxy" || is_service_enabled tls-proxy; then
fi fi
# Set up default directories # Set up default directories
GITDIR["swiftclient"]=$DEST/python-swiftclient GITDIR["python-swiftclient"]=$DEST/python-swiftclient
SWIFT_DIR=$DEST/swift SWIFT_DIR=$DEST/swift
@ -677,9 +677,9 @@ function install_swift {
} }
function install_swiftclient { function install_swiftclient {
if use_library_from_git "swiftclient"; then if use_library_from_git "python-swiftclient"; then
git_clone_by_name "swiftclient" git_clone_by_name "python-swiftclient"
setup_develop "swiftclient" setup_dev_lib "python-swiftclient"
fi fi
} }

View File

@ -28,7 +28,7 @@ else
fi fi
# Set up default configuration # Set up default configuration
GITDIR["troveclient"]=$DEST/python-troveclient GITDIR["python-troveclient"]=$DEST/python-troveclient
TROVE_DIR=$DEST/trove TROVE_DIR=$DEST/trove
TROVE_CONF_DIR=/etc/trove TROVE_CONF_DIR=/etc/trove
@ -181,9 +181,9 @@ function configure_trove {
# install_troveclient() - Collect source and prepare # install_troveclient() - Collect source and prepare
function install_troveclient { function install_troveclient {
if use_library_from_git "troveclient"; then if use_library_from_git "python-troveclient"; then
git_clone_by_name "troveclient" git_clone_by_name "python-troveclient"
setup_develop "troveclient" setup_dev_lib "python-troveclient"
fi fi
} }

View File

@ -584,7 +584,7 @@ if [[ -d $TOP_DIR/extras.d ]]; then
fi fi
# Set the destination directories for other OpenStack projects # Set the destination directories for other OpenStack projects
GITDIR["openstackclient"]=$DEST/python-openstackclient GITDIR["python-openstackclient"]=$DEST/python-openstackclient
# Interactive Configuration # Interactive Configuration
# ------------------------- # -------------------------
@ -788,9 +788,9 @@ fi
install_keystonemiddleware install_keystonemiddleware
# install the OpenStack client, needed for most setup commands # install the OpenStack client, needed for most setup commands
if use_library_from_git "openstackclient"; then if use_library_from_git "python-openstackclient"; then
git_clone_by_name "openstackclient" git_clone_by_name "python-openstackclient"
setup_develop "openstackclient" setup_dev_lib "python-openstackclient"
else else
pip_install python-openstackclient pip_install python-openstackclient
fi fi

44
stackrc
View File

@ -210,48 +210,48 @@ GITBRANCH["tempest_lib"]=${TEMPEST_LIB_BRANCH:-master}
############## ##############
# ceilometer client library # ceilometer client library
GITREPO["ceilometerclient"]=${CEILOMETERCLIENT_REPO:-${GIT_BASE}/openstack/python-ceilometerclient.git} GITREPO["python-ceilometerclient"]=${CEILOMETERCLIENT_REPO:-${GIT_BASE}/openstack/python-ceilometerclient.git}
GITBRANCH["ceilometerclient"]=${CEILOMETERCLIENT_BRANCH:-master} GITBRANCH["python-ceilometerclient"]=${CEILOMETERCLIENT_BRANCH:-master}
# volume client # volume client
GITREPO["cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git} GITREPO["python-cinderclient"]=${CINDERCLIENT_REPO:-${GIT_BASE}/openstack/python-cinderclient.git}
GITBRACH["cinderclient"]=${CINDERCLIENT_BRANCH:-master} GITBRACH["python-cinderclient"]=${CINDERCLIENT_BRANCH:-master}
# python glance client library # python glance client library
GITREPO["glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git} GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git}
GITBRANCH["glanceclient"]=${GLANCECLIENT_BRANCH:-master} GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-master}
# python heat client library # python heat client library
GITREPO["heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git} GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git}
GITBRANCH["heatclient"]=${HEATCLIENT_BRANCH:-master} GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
# ironic client # ironic client
GITREPO["ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git} GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git}
GITBRANCH["ironicclient"]=${IRONICCLIENT_BRANCH:-master} GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-master}
# python keystone client library to nova that horizon uses # python keystone client library to nova that horizon uses
GITREPO["keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git} GITREPO["python-keystoneclient"]=${KEYSTONECLIENT_REPO:-${GIT_BASE}/openstack/python-keystoneclient.git}
GITBRANCH["keystoneclient"]=${KEYSTONECLIENT_BRANCH:-master} GITBRANCH["python-keystoneclient"]=${KEYSTONECLIENT_BRANCH:-master}
# neutron client # neutron client
GITREPO["neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git} GITREPO["python-neutronclient"]=${NEUTRONCLIENT_REPO:-${GIT_BASE}/openstack/python-neutronclient.git}
GITBRANCH["neutronclient"]=${NEUTRONCLIENT_BRANCH:-master} GITBRANCH["python-neutronclient"]=${NEUTRONCLIENT_BRANCH:-master}
# python client library to nova that horizon (and others) use # python client library to nova that horizon (and others) use
GITREPO["novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git} GITREPO["python-novaclient"]=${NOVACLIENT_REPO:-${GIT_BASE}/openstack/python-novaclient.git}
GITBRANCH["novaclient"]=${NOVACLIENT_BRANCH:-master} GITBRANCH["python-novaclient"]=${NOVACLIENT_BRANCH:-master}
# python swift client library # python swift client library
GITREPO["swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git} GITREPO["python-swiftclient"]=${SWIFTCLIENT_REPO:-${GIT_BASE}/openstack/python-swiftclient.git}
GITBRANCH["swiftclient"]=${SWIFTCLIENT_BRANCH:-master} GITBRANCH["python-swiftclient"]=${SWIFTCLIENT_BRANCH:-master}
# trove client library test # trove client library test
GITREPO["troveclient"]=${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git} GITREPO["python-troveclient"]=${TROVECLIENT_REPO:-${GIT_BASE}/openstack/python-troveclient.git}
GITBRANCH["troveclient"]=${TROVECLIENT_BRANCH:-master} GITBRANCH["python-troveclient"]=${TROVECLIENT_BRANCH:-master}
# consolidated openstack python client # consolidated openstack python client
GITREPO["openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git} GITREPO["python-openstackclient"]=${OPENSTACKCLIENT_REPO:-${GIT_BASE}/openstack/python-openstackclient.git}
GITBRANCH["openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master} GITBRANCH["python-openstackclient"]=${OPENSTACKCLIENT_BRANCH:-master}
################### ###################
# #