Use local pip storage for offline deploy

PROD-36734
Change-Id: I4cf702a709585174513b92c17b5f93567451d326
diff --git a/src/com/mirantis/mk/Python.groovy b/src/com/mirantis/mk/Python.groovy
index 8f934c0..a8f0d56 100644
--- a/src/com/mirantis/mk/Python.groovy
+++ b/src/com/mirantis/mk/Python.groovy
@@ -53,7 +53,12 @@
         writeFile file: "${path}/requirements.txt", text: args
         reqs_path = "${path}/requirements.txt"
     }
-    runVirtualenvCommand(path, "pip install -r ${reqs_path}", true)
+    
+    def install_cmd = 'pip install'
+    if (offlineDeployment) {
+        install_cmd += " --find-links=/opt/pip-mirror "
+    }
+    runVirtualenvCommand(path, "${install_cmd} -r ${reqs_path}", true)
 }
 
 /**