Merge "Switch download scripts from Mirantis repo"
diff --git a/openstack-compute-install.groovy b/openstack-compute-install.groovy
index 82a3e40..3cf6aaa 100644
--- a/openstack-compute-install.groovy
+++ b/openstack-compute-install.groovy
@@ -39,13 +39,13 @@
         }
 
         stage("Trusty workaround") {
-            if(salt.getGrain(saltMaster, minions[0], "oscodename")['return'][0].values()[0]["oscodename"] == "trusty") {
+            if(salt.getGrain(pepperEnv, minions[0], "oscodename")['return'][0].values()[0]["oscodename"] == "trusty") {
                 common.infoMsg("First node %nodename% has trusty")
                 common.infoMsg("Assuming trusty on all cluster, running extra network states...")
                 common.infoMsg("Network iteration #1. Bonding")
-                salt.enforceState(saltMaster, targetLiveAll, 'linux.network', true)
+                salt.enforceState(pepperEnv, targetLiveAll, 'linux.network', true)
                 common.infoMsg("Network iteration #2. Vlan tagging and bridging")
-                salt.enforceState(saltMaster, targetLiveAll, 'linux.network', true)
+                salt.enforceState(pepperEnv, targetLiveAll, 'linux.network', true)
             }
         }
 
diff --git a/test-run-rally.groovy b/test-run-rally.groovy
index d92d988..71e5f8b 100644
--- a/test-run-rally.groovy
+++ b/test-run-rally.groovy
@@ -9,6 +9,7 @@
  *   IMAGE_LINK                      Link to docker image with Rally
  *   RALLY_SCENARIO                  Rally test scenario
  *   TEST_TARGET                     Salt target for Rally node
+ *   CONTAINER_NAME                  Name of the Docker container which runs Rally
  *   CLEANUP_REPORTS_AND_CONTAINER   Cleanup reports from rally,tempest container, remove all containers started the IMAGE_LINK
  *   DO_CLEANUP_RESOURCES            If "true": runs clean-up script for removing Rally and Tempest resources
  */
@@ -52,7 +53,7 @@
         if (CLEANUP_REPORTS_AND_CONTAINER.toBoolean()) {
             stage('Cleanup reports and container') {
                 test.removeReports(pepperEnv, TEST_TARGET, "rally_reports", 'rally_reports.tar')
-                test.removeDockerContainer(pepperEnv, TEST_TARGET, IMAGE_LINK)
+                test.removeDockerContainer(pepperEnv, TEST_TARGET, CONTAINER_NAME)
             }
         }
     }
diff --git a/test-run-tempest.groovy b/test-run-tempest.groovy
index 0011daa..1f8a09b 100644
--- a/test-run-tempest.groovy
+++ b/test-run-tempest.groovy
@@ -9,7 +9,9 @@
  *   IMAGE_LINK                      Link to docker image with Rally and Tempest
  *   TEST_TEMPEST_PATTERN            If not false, run tests matched to pattern only
  *   TEST_TARGET                     Salt target for tempest node
- *   CLEANUP_REPORTS_AND_CONTAINER   Cleanup reports from rally,tempest container, remove all containers started the IMAGE_LINK
+ *   CLEANUP_REPORTS                 Cleanup reports from rally,tempest container, remove all containers started the IMAGE_LINK
+ *   SET                             Predefined set for tempest tests
+ *   CONCURRENCY                     How many processes to use to run Tempest tests
  *   DO_CLEANUP_RESOURCES            If "true": runs clean-up script for removing Rally and Tempest resources
  */
 
@@ -34,7 +36,8 @@
 
         stage('Run OpenStack Tempest tests') {
             test.runTempestTests(pepperEnv, IMAGE_LINK, TEST_TARGET, TEST_TEMPEST_PATTERN, "/home/rally/rally_reports/",
-                    DO_CLEANUP_RESOURCES)
+                    "/home/rally/keystonercv3", SET, CONCURRENCY, "mcp.conf", "mcp_skip.list", "/root/keystonercv3",
+                    "/root/rally_reports", DO_CLEANUP_RESOURCES)
         }
         stage('Copy test reports') {
             test.copyTempestResults(pepperEnv, TEST_TARGET)
@@ -46,10 +49,9 @@
         currentBuild.result = 'FAILURE'
         throw e
     } finally {
-        if (CLEANUP_REPORTS_AND_CONTAINER.toBoolean()) {
-            stage('Cleanup reports and container') {
+        if (CLEANUP_REPORTS.toBoolean()) {
+            stage('Cleanup reports') {
                 test.removeReports(pepperEnv, TEST_TARGET, "rally_reports", 'rally_reports.tar')
-                test.removeDockerContainer(pepperEnv, TEST_TARGET, IMAGE_LINK)
             }
         }
     }