From 7316815055a42d4fa601e2bef4d7696e00a2553b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= <radoslaw.piliszek@gmail.com>
Date: Fri, 12 Jun 2020 21:33:22 +0200
Subject: [PATCH] CI: Move NFV reqs installation to where it belongs

This ought to fix #1864238 for the stable branches.

Change-Id: I218905247a4a4003ecfc2c9ab3e47767bb5ab33e
Related-bug: #1864238
---
 tests/test-scenario-nfv.sh | 6 ------
 tools/setup_gate.sh        | 3 +++
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/tests/test-scenario-nfv.sh b/tests/test-scenario-nfv.sh
index 8388ed3cec..af9f382023 100755
--- a/tests/test-scenario-nfv.sh
+++ b/tests/test-scenario-nfv.sh
@@ -48,16 +48,10 @@ function test_heat {
     openstack stack list
 }
 
-function install_requirements {
-    echo "TESTING: Install requirements"
-    pip install "python-tackerclient" "python-heatclient" "networking-sfc" "python-mistralclient" "python-barbicanclient"
-}
-
 function test_scenario_nfv_logged {
     . /etc/kolla/admin-openrc.sh
     . ~/openstackclient-venv/bin/activate
 
-    install_requirements
     test_tacker
     test_barbican
     test_mistral
diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh
index c734d613df..d2052cbcab 100755
--- a/tools/setup_gate.sh
+++ b/tools/setup_gate.sh
@@ -20,6 +20,9 @@ function setup_openstack_clients {
     if [[ $SCENARIO == masakari ]]; then
         packages+=(python-masakariclient)
     fi
+    if [[ $SCENARIO == scenario_nfv ]]; then
+        packages+=(python-tackerclient python-barbicanclient python-mistralclient)
+    fi
     if [[ "debian" == $BASE_DISTRO ]]; then
         sudo apt -y install python3-venv
     fi