aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick')
-rw-r--r--yardstick/common/constants.py15
-rw-r--r--yardstick/common/exceptions.py12
2 files changed, 27 insertions, 0 deletions
diff --git a/yardstick/common/constants.py b/yardstick/common/constants.py
index 8640afbae..f6e4ab7e9 100644
--- a/yardstick/common/constants.py
+++ b/yardstick/common/constants.py
@@ -145,6 +145,21 @@ BASE_URL = 'http://localhost:5000'
ENV_ACTION_API = BASE_URL + '/yardstick/env/action'
ASYNC_TASK_API = BASE_URL + '/yardstick/asynctask'
+API_ERRORS = {
+ 'UploadOpenrcError': {
+ 'message': "Upload openrc ERROR!",
+ 'status': API_ERROR,
+ },
+ 'UpdateOpenrcError': {
+ 'message': "Update openrc ERROR!",
+ 'status': API_ERROR,
+ },
+ 'ApiServerError': {
+ 'message': "An unkown exception happened to Api Server!",
+ 'status': API_ERROR,
+ },
+}
+
# flags
IS_EXISTING = 'is_existing'
IS_PUBLIC = 'is_public'
diff --git a/yardstick/common/exceptions.py b/yardstick/common/exceptions.py
index c7ba56268..8a0c52d31 100644
--- a/yardstick/common/exceptions.py
+++ b/yardstick/common/exceptions.py
@@ -247,3 +247,15 @@ class ScenarioDeleteVolumeError(YardstickException):
class ScenarioDetachVolumeError(YardstickException):
message = 'Cinder Detach Volume Scenario failed'
+
+
+class ApiServerError(YardstickException):
+ message = 'An unkown exception happened to Api Server!'
+
+
+class UploadOpenrcError(ApiServerError):
+ message = 'Upload openrc ERROR!'
+
+
+class UpdateOpenrcError(ApiServerError):
+ message = 'Update openrc ERROR!'