-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sleep after disk deletion (#691)
- Loading branch information
Showing
3 changed files
with
31 additions
and
30 deletions.
There are no files selected for viewing
34 changes: 13 additions & 21 deletions
34
benchmark_runner/common/ocp_resources/create_ocp_resource_exceptions.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
|
||
class OCError(Exception): | ||
""" Base class for all OC error classes. | ||
All exceptions raised by the benchmark runner library should inherit from this class. """ | ||
class OCPResourceError(Exception): | ||
""" Base class for all OCP resource error classes. """ | ||
pass | ||
|
||
|
||
class OCPResourceNotCreateTimeout(OCError): | ||
"""This exception return resource create timeout error""" | ||
class OCPResourceCreationTimeout(OCPResourceError): | ||
"""This exception returns resource creation timeout error""" | ||
def __init__(self, resource): | ||
self.message = f'The {resource} resource was not created' | ||
super(OCPResourceNotCreateTimeout, self).__init__(self.message) | ||
super(OCPResourceCreationTimeout, self).__init__(self.message) | ||
|
||
|
||
class KataInstallationFailed(OCError): | ||
class ODFInstallationFailed(OCPResourceError): | ||
"""This exception returns failure to install ODF""" | ||
def __init__(self, disk_num): | ||
self.message = f'Incorrect ODF Ceph disk number: {disk_num}' | ||
super(ODFInstallationFailed, self).__init__(self.message) | ||
|
||
|
||
class KataInstallationFailed(OCPResourceError): | ||
"""This exception returns failure to install sandboxed containers""" | ||
def __init__(self, reason): | ||
self.message = f'Installation of sandboxed containers failed: {reason}' | ||
super(KataInstallationFailed, self).__init__(self.message) | ||
|
||
|
||
class ExecFailed(OCError): | ||
"""exec command on pod failed""" | ||
def __init__(self, pod, command, reason): | ||
self.message = f'exec {command} on {pod} failed: {reason}' | ||
super(ExecFailed, self).__init__(self.message) | ||
|
||
|
||
class PodFailed(OCError): | ||
"""exec command on pod failed""" | ||
def __init__(self, pod): | ||
self.message = f'pod {pod} failed' | ||
super(PodFailed, self).__init__(self.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters