Minor change in virtual env creation 14/414/2
authorJan Gelety <jgelety@cisco.com>
Thu, 25 Feb 2016 16:12:19 +0000 (17:12 +0100)
committerGerrit Code Review <gerrit@fd.io>
Sat, 27 Feb 2016 08:21:34 +0000 (08:21 +0000)
- increase timeout for virtualenv creation
- confirm successful virtualenv creation

Change-Id: Ic973f97e23ccf35c677849f31251637bf8551fef
Signed-off-by: Jan Gelety <jgelety@cisco.com>
resources/libraries/python/SetupFramework.py

index cb0d536..399e7fd 100644 (file)
@@ -79,10 +79,12 @@ def create_env_directory_at_node(node):
     (ret_code, stdout, stderr) = ssh.exec_command(
             'cd {0} && rm -rf env && virtualenv env && '
             '. env/bin/activate && '
-            'pip install -r requirements.txt'.format(con.REMOTE_FW_DIR))
+            'pip install -r requirements.txt'.format(con.REMOTE_FW_DIR), timeout=100)
     if 0 != ret_code:
         logger.error('Virtualenv creation error: {0}'.format(stdout + stderr))
         raise Exception('Virtualenv setup failed')
+    else:
+        logger.console('Virtualenv created on {0}'.format(node['host']))
 
 def install_dependencies(node):
     """TEMPORARY FUNCTION TO INSTALL DEPENDENCIES ON NODES BEFORE THE VIRL