From 5f90f95291bd5eb4bd154990647380ce64f39fea Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 22 Feb 2017 16:15:34 -0600 Subject: [PATCH] Include tricircleclient installation 1. What is the problem? The python-tricircleclient has been included as part of the OpenStack official repositories[1] but their integration hasn't been done in Devstack. [1] https://review.openstack.org/#/c/426419/ 2. What is the solution to the problem? Add the required instructions to control the installation of the client in the plugin.sh script. Usually those instructions have a standard format which needs to be follow. 3. What the features need to be implemented to the Tricircle to realize the solution? None Change-Id: I0f2df46316f191c443b9192875868d4c7be96c1b --- devstack/plugin.sh | 16 ++++++++++++++-- devstack/settings | 5 +++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 810ac546..0c0ae592 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -19,9 +19,9 @@ function create_tricircle_accounts { local tricircle_api=$(get_or_create_service "tricircle" \ "tricircle" "Cross Neutron Networking Automation Service") - local tricircle_api_url="$SERVICE_PROTOCOL://$TRICIRCLE_API_HOST/tricircle" + local tricircle_api_url="$SERVICE_PROTOCOL://$TRICIRCLE_API_HOST/tricircle/v1.0" if [[ "$TRICIRCLE_DEPLOY_WITH_WSGI" == "False" ]]; then - tricircle_api_url="$SERVICE_PROTOCOL://$TRICIRCLE_API_HOST:$TRICIRCLE_API_PORT/" + tricircle_api_url="$SERVICE_PROTOCOL://$TRICIRCLE_API_HOST:$TRICIRCLE_API_PORT/v1.0/" fi get_or_create_endpoint $tricircle_api \ @@ -269,6 +269,17 @@ function start_central_neutron_server { run_process q-svc$server_index "$NEUTRON_BIN_DIR/neutron-server --config-file $NEUTRON_CONF.$server_index --config-file /$Q_PLUGIN_CONF_FILE" } +# install_tricircleclient() - Collect source and prepare +function install_tricircleclient { + if use_library_from_git "python-tricircleclient"; then + git_clone_by_name "python-tricircleclient" + setup_dev_lib "python-tricircleclient" + else + pip_install_gr tricircleclient + fi +} + + # if the plugin is enabled to run, that means the Tricircle is enabled # by default, so no need to judge the variable Q_ENABLE_TRICIRCLE @@ -283,6 +294,7 @@ elif [[ "$1" == "stack" && "$2" == "install" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then echo_summary "Configuring Tricircle" + install_tricircleclient export NEUTRON_CREATE_INITIAL_NETWORKS=False sudo install -d -o $STACK_USER -m 755 $TRICIRCLE_CONF_DIR diff --git a/devstack/settings b/devstack/settings index f7c0728b..449d8aee 100644 --- a/devstack/settings +++ b/devstack/settings @@ -37,3 +37,8 @@ TRICIRCLE_XJOB_CONF=$TRICIRCLE_CONF_DIR/xjob.conf TRICIRCLE_AUTH_CACHE_DIR=${TRICIRCLE_AUTH_CACHE_DIR:-/var/cache/tricircle} export PYTHONPATH=$PYTHONPATH:$TRICIRCLE_DIR + +# Set up default directories for client +GITREPO["python-tricircleclient"]=${TRICIRCLE_PYTHONCLIENT_REPO:-${GIT_BASE}/openstack/python-tricircleclient.git} +GITBRANCH["python-tricircleclient"]=${TRICIRCLE_PYTHONCLIENT_BRANCH:-master} +GITDIR["python-tricircleclient"]=$DEST/python-tricircleclient