From c0136b4f5c23a808b6ea98164d0469bb739ecbc6 Mon Sep 17 00:00:00 2001
From: parmentelat <thierry.parmentelat@inria.fr>
Date: Tue, 4 Dec 2018 13:49:42 +0100
Subject: [PATCH] install django using pip

---
 system/TestPlc.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/system/TestPlc.py b/system/TestPlc.py
index 6c74294..fec7533 100644
--- a/system/TestPlc.py
+++ b/system/TestPlc.py
@@ -153,7 +153,7 @@ class TestPlc:
     default_steps = [
         'show', SEP,
         'plcvm_delete','plcvm_timestamp','plcvm_create', SEP,
-        'plc_install', 'plc_configure', 'plc_start', SEP,
+        'django_install', 'plc_install', 'plc_configure', 'plc_start', SEP,
         'keys_fetch', 'keys_store', 'keys_clear_known_hosts', SEP,
         'plcapi_urls','speed_up_slices', SEP,
         'initscripts', 'sites', 'nodes', 'slices', 'nodegroups', 'leases', SEP,
@@ -350,6 +350,9 @@ class TestPlc:
         self.run_in_guest("yum-complete-transaction -y")
         return self.yum_check_installed(rpms)
 
+    def pip_install(self, package):
+        return self.run_in_guest("pip install {}".format(package))
+
     def auth_root(self):
         return {'Username'   : self.plc_spec['settings']['PLC_ROOT_USER'],
                 'AuthMethod' : 'password',
@@ -711,6 +714,15 @@ class TestPlc:
         create_vserver="{build_dir}/{script} {script_options} {vserver_name}".format(**locals())
         return self.run_in_host(create_vserver) == 0
 
+    ### install django through pip
+    def django_install(self):
+        # plcapi requires Django, that is no longer provided py fedora as an rpm
+        # so we use pip instead
+        """
+        pip install Django
+        """
+        return self.pip_install('Django')
+
     ### install_rpm
     def plc_install(self):
         """
-- 
2.47.0