summaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
diff options
context:
space:
mode:
authorrexlee8776 <limingjiang@huawei.com>2019-01-22 03:34:30 +0000
committerRex Lee <limingjiang@huawei.com>2019-01-24 01:41:05 +0000
commit4ed023a3e15cfb7029ee612e21252cabdc1974d2 (patch)
tree6ebf4d8aa9fa6fc631cd97b0ef9e466777c2aa2d /yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
parenta1e5634d35ba5f0095fdd2777efa4042b1872127 (diff)
[dovetail] split the sla check results into process recovery and service
recovery for HA tcs make sla check for process recovery optional: only check when sla is set. JIRA: YARDSTICK-1512 Change-Id: I717d39614a1af2ee9e62dec3b8a32d7d611f557e Signed-off-by: rexlee8776 <limingjiang@huawei.com> (cherry picked from commit 39d89761aca4aaf724010a9f8cac73725b798b33)
Diffstat (limited to 'yardstick/benchmark/scenarios/availability/monitor/monitor_process.py')
-rw-r--r--yardstick/benchmark/scenarios/availability/monitor/monitor_process.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
index 8d2f2633c..280e5811d 100644
--- a/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
+++ b/yardstick/benchmark/scenarios/availability/monitor/monitor_process.py
@@ -46,12 +46,12 @@ class MonitorProcess(basemonitor.BaseMonitor):
def verify_SLA(self):
outage_time = self._result.get('outage_time', None)
- max_outage_time = self._config["sla"]["max_recover_time"]
- if outage_time > max_outage_time:
- LOG.info("SLA failure: %f > %f", outage_time, max_outage_time)
- return False
- else:
- return True
+ if self._config.get("sla"):
+ max_outage_time = self._config["sla"]["max_recover_time"]
+ if outage_time > max_outage_time:
+ LOG.info("SLA failure: %f > %f", outage_time, max_outage_time)
+ return False
+ return True
def _test(): # pragma: no cover