From 3b670b601b41618f2cb6ded94193ed0d7c489073 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 12 May 2016 15:19:07 +0100 Subject: [PATCH] DevStack: Support to install virtualbmc from source This patch is extending the Ironic DevStack plugin to allow virtualbmc to be installed from source so we can run ironic jobs against the virtualbmc gate. Change-Id: Iba6ea79a1ca2d8c4f0620e04108fad74ad55b9d3 --- devstack/lib/ironic | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 51b442601b..9604a927bc 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -37,6 +37,10 @@ GITREPO["pyghmi"]=${PYGHMI_REPO:-${GIT_BASE}/openstack/pyghmi.git} GITBRANCH["pyghmi"]=${PYGHMI_BRANCH:-master} GITDIR["pyghmi"]=$DEST/pyghmi +GITREPO["virtualbmc"]=${VIRTUALBMC_REPO:-${GIT_BASE}/openstack/virtualbmc.git} +GITBRANCH["virtualbmc"]=${VIRTUALBMC_BRANCH:-master} +GITDIR["virtualbmc"]=$DEST/virtualbmc + IRONIC_DIR=$DEST/ironic IRONIC_DEVSTACK_DIR=$IRONIC_DIR/devstack IRONIC_DEVSTACK_FILES_DIR=$IRONIC_DEVSTACK_DIR/files @@ -273,9 +277,12 @@ function setup_virtualbmc { setup_dev_lib "pyghmi" fi - # TODO(lucasagomes): Allow virtualbmc to be installed from source - # after the openstack/virtualbmc repository is setup correctly - pip_install "virtualbmc" + if use_library_from_git "virtualbmc"; then + git_clone_by_name "virtualbmc" + setup_dev_lib "virtualbmc" + else + pip_install "virtualbmc" + fi if [[ ! -d $(dirname $IRONIC_VBMC_CONFIG_FILE) ]]; then mkdir -p $(dirname $IRONIC_VBMC_CONFIG_FILE)