From 9d397d256824775d81237cf79039d49d1515cf68 Mon Sep 17 00:00:00 2001 From: Nisha Agarwal Date: Tue, 29 Mar 2016 20:29:05 -0700 Subject: [PATCH] Install proliantutils in IPA's virtualenv The proliant-tools element helps to do RAID configuration in ironic for HPE servers. This fix proposes to install the proliantutils in ironic-python-agent's virtualenv created using ironic-agent element. Closes-Bug: 1563648 Change-Id: If63c725a42740ab244a2b4004797cba09d0f154e --- .../install.d/65-proliant-tools-install | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/elements/proliant-tools/install.d/65-proliant-tools-install b/elements/proliant-tools/install.d/65-proliant-tools-install index 053f1bed..38a9b9c2 100755 --- a/elements/proliant-tools/install.d/65-proliant-tools-install +++ b/elements/proliant-tools/install.d/65-proliant-tools-install @@ -34,5 +34,13 @@ fi rm -f /tmp/hpssacli.rpm -# Install proliantutils python module -pip install proliantutils +# Install proliantutils python module in the +# virtual environment of ironic-python-agent. +# This is pre-installed by +# ironic-agent/install.d/ironic-agent-source-install/60-ironic-agent-install. +IPA_VENV=/usr/share/ironic-python-agent/venv +if [[ -d "$IPA_VENV" ]]; then + $IPA_VENV/bin/pip install proliantutils +else + pip install proliantutils +fi