forked from ManageIQ/integration_tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkloads.py
71 lines (55 loc) · 3.63 KB
/
workloads.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""Functions for workloads."""
from utils.conf import cfme_performance
def get_capacity_and_utilization_replication_scenarios():
if 'test_cap_and_util_rep' in cfme_performance.get('tests', {}).get('workloads', []):
if (cfme_performance['tests']['workloads']['test_cap_and_util_rep']['scenarios'] and
len(
cfme_performance['tests']['workloads']['test_cap_and_util_rep']['scenarios']) > 0):
# Add Replication Master into Scenario(s):
for scn in cfme_performance['tests']['workloads']['test_cap_and_util_rep']['scenarios']:
scn['replication_master'] = cfme_performance['replication_master']
return cfme_performance['tests']['workloads']['test_cap_and_util_rep']['scenarios']
return []
def get_capacity_and_utilization_scenarios():
if 'test_cap_and_util' in cfme_performance.get('tests', {}).get('workloads', []):
if (cfme_performance['tests']['workloads']['test_cap_and_util']['scenarios'] and
len(cfme_performance['tests']['workloads']['test_cap_and_util']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_cap_and_util']['scenarios']
return []
def get_idle_scenarios():
if 'test_idle' in cfme_performance.get('tests', {}).get('workloads', []):
if(cfme_performance['tests']['workloads']['test_idle']['scenarios'] and
len(cfme_performance['tests']['workloads']['test_idle']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_idle']['scenarios']
return []
def get_provisioning_scenarios():
if 'test_provisioning' in cfme_performance.get('tests', {}).get('workloads', []):
if(cfme_performance['tests']['workloads']['test_provisioning']['scenarios'] and
len(cfme_performance['tests']['workloads']['test_provisioning']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_provisioning']['scenarios']
return []
def get_refresh_providers_scenarios():
if 'test_refresh_providers' in cfme_performance.get('tests', {}).get('workloads', []):
if (cfme_performance['tests']['workloads']['test_refresh_providers']['scenarios'] and
len(
cfme_performance['tests']['workloads']['test_refresh_providers']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_refresh_providers']['scenarios']
return []
def get_refresh_vms_scenarios():
if 'test_refresh_vms' in cfme_performance.get('tests', {}).get('workloads', []):
if (cfme_performance['tests']['workloads']['test_refresh_vms']['scenarios'] and
len(cfme_performance['tests']['workloads']['test_refresh_vms']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_refresh_vms']['scenarios']
return []
def get_smartstate_analysis_scenarios():
if 'test_smartstate' in cfme_performance.get('tests', {}).get('workloads', []):
if(cfme_performance['tests']['workloads']['test_smartstate']['scenarios'] and
len(cfme_performance['tests']['workloads']['test_smartstate']['scenarios']) > 0):
return cfme_performance['tests']['workloads']['test_smartstate']['scenarios']
return []
def get_ui_single_page_scenarios():
if 'test_ui_single_page' in cfme_performance.get('tests', {}).get('ui_workloads', []):
if(cfme_performance['tests']['ui_workloads']['test_ui_single_page']['scenarios'] and
len(cfme_performance['tests']['ui_workloads']['test_ui_single_page']['scenarios']) > 0):
return cfme_performance['tests']['ui_workloads']['test_ui_single_page']['scenarios']
return []