Parametrize autoscaling instance load length

We need the duration for which the instance for autoscaling
testing is under load parametrized. Currently with a static
duration of 2 minutes the scenario might fail in situations
with a high ceilometer polling interval. In these situations
the load might already be finished before ceilometer polls
for the CPU metric, which results in a seemingly low CPU
utilization, because of which the stack doesn't ever scale
up and the scenario fails.

With this patch, the load lasts 2x (the ceilometer polling
interval + prometheus scrape interval),
which guarantees that at least on polling period
will be with 100% load, which will result in a high CPU
utilization registered by ceilometer.

As a sideeffect this might slightly speedup the scenario
in situations with a low ceilometer polling interval.

Change-Id: Ib673e67800d2d16d552e734fea89772a0e937105
diff --git a/telemetry_tempest_plugin/scenario/telemetry_integration_prometheus_gabbits/create_stack.json b/telemetry_tempest_plugin/scenario/telemetry_integration_prometheus_gabbits/create_stack.json
index 47d15f1..036e5fb 100644
--- a/telemetry_tempest_plugin/scenario/telemetry_integration_prometheus_gabbits/create_stack.json
+++ b/telemetry_tempest_plugin/scenario/telemetry_integration_prometheus_gabbits/create_stack.json
@@ -23,7 +23,7 @@
                                 "#!/bin/sh\n",
                                 "echo 'Loading CPU'\n",
                                 "set -v\n",
-                                "cat /dev/urandom > /dev/null & sleep 120 ; kill $! \n"
+                                "cat /dev/urandom > /dev/null & sleep $ENVIRON['LOAD_LENGTH'] ; kill $! \n"
                             ]]}
                         }
                     }
diff --git a/telemetry_tempest_plugin/scenario/test_telemetry_integration_prometheus.py b/telemetry_tempest_plugin/scenario/test_telemetry_integration_prometheus.py
index 63b4661..9c13b68 100644
--- a/telemetry_tempest_plugin/scenario/test_telemetry_integration_prometheus.py
+++ b/telemetry_tempest_plugin/scenario/test_telemetry_integration_prometheus.py
@@ -135,6 +135,7 @@
             "STACK_NAME": self.stack_name,
             "RESOURCE_PREFIX": resource_prefix,
             "PROMETHEUS_RATE_DURATION": str(prometheus_rate_duration),
+            "LOAD_LENGTH": str(prometheus_rate_duration * 2),
         })