-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathworkloads_exceptions.py
More file actions
89 lines (70 loc) · 2.8 KB
/
workloads_exceptions.py
File metadata and controls
89 lines (70 loc) · 2.8 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
class BenchmarkRunnerError(Exception):
""" Base class for all benchmark runner error classes.
All exceptions raised by the benchmark runner library should inherit from this class. """
pass
class CNVNotInstalled(BenchmarkRunnerError):
"""
This class raises an error that CNV operator is not installed
"""
def __init__(self, workload):
self.message = f"{workload} requires CNV to be installed"
super(CNVNotInstalled, self).__init__(self.message)
class KataNotInstalled(BenchmarkRunnerError):
"""
This class raises an error that Kata operator is not installed
"""
def __init__(self, workload):
self.message = f"{workload} requires Kata to be installed"
super(KataNotInstalled, self).__init__(self.message)
class ODFNotInstalled(BenchmarkRunnerError):
"""
This class raises an error that ODF operator is not installed
"""
def __init__(self, workload):
self.message = f"{workload} requires ODF to be installed, set 'ODF_PVC' to False to run with Ephemeral"
super(ODFNotInstalled, self).__init__(self.message)
class EmptyLSOPath(BenchmarkRunnerError):
"""
This class raises an error that LSO disk id is empty
"""
def __init__(self):
self.message = "LSO disk id is empty, set 'LSO_DISK_ID' or configure 'worker_disk_ids'"
super(EmptyLSOPath, self).__init__(self.message)
class MissingScaleNodes(BenchmarkRunnerError):
"""
This class raises an error for missing scale nodes
"""
def __init__(self):
self.message = "Missing scale nodes"
super(MissingScaleNodes, self).__init__(self.message)
class MissingRedis(BenchmarkRunnerError):
"""
This class raises an error for missing redis for scale synchronization
"""
def __init__(self):
self.message = "Missing redis"
super(MissingRedis, self).__init__(self.message)
class MissingVMs(BenchmarkRunnerError):
"""
This class raises an error for missing VMs
"""
def __init__(self):
self.message = "Missing running VMs"
super(MissingVMs, self).__init__(self.message)
class Windows_HammerDB_NOT_Succeeded(BenchmarkRunnerError):
"""
This class raises an error for missing VMs
"""
def __init__(self, message: str):
if message:
self.message = message
else:
self.message = "Windows HammerDB workload did not succeed within the timeout"
super(Windows_HammerDB_NOT_Succeeded, self).__init__(self.message)
class MissingIOOperation(BenchmarkRunnerError):
"""
This class raises an error when IO_OPERATION is not found in the rendered YAML
"""
def __init__(self, yaml_path: str):
self.message = f"IO_OPERATION not found in {yaml_path}"
super(MissingIOOperation, self).__init__(self.message)