diff options
author | 2020-02-25 14:26:21 +0800 | |
---|---|---|
committer | 2020-02-25 14:26:57 +0800 | |
commit | a9a3ee11e04094511c793d529092e488c75de128 (patch) | |
tree | 3056d8d5818ff4dff8647a1361638f8bfba741af /catalog/pub/utils | |
parent | 600a01f40cb7ac14167dfd242ec694ef62474bc8 (diff) |
update the errorCode in job information
Change-Id: Ic44082580d585f538dfed2ea0445e2100e7ce221
Issue-ID: MODELING-318
Signed-off-by: dyh <dengyuanhong@chinamobile.com>
Diffstat (limited to 'catalog/pub/utils')
-rw-r--r-- | catalog/pub/utils/jobutil.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/catalog/pub/utils/jobutil.py b/catalog/pub/utils/jobutil.py index 5c35350..c2e1c15 100644 --- a/catalog/pub/utils/jobutil.py +++ b/catalog/pub/utils/jobutil.py @@ -13,8 +13,8 @@ # limitations under the License. import datetime import logging -import uuid import traceback +import uuid from functools import reduce from catalog.pub.database.models import JobStatusModel, JobModel @@ -29,8 +29,10 @@ def enum(**enums): JOB_STATUS = enum(PROCESSING=0, FINISH=1) JOB_MODEL_STATUS = enum(STARTED='started', PROCESSING='processing', FINISHED='finished', ERROR='error', TIMEOUT='timeout') -JOB_TYPE = enum(CREATE_VNF="create vnf", TERMINATE_VNF="terminate vnf", GRANT_VNF="grant vnf", MANUAL_SCALE_VNF="manual scale vnf", +JOB_TYPE = enum(CREATE_VNF="create vnf", TERMINATE_VNF="terminate vnf", GRANT_VNF="grant vnf", + MANUAL_SCALE_VNF="manual scale vnf", HEAL_VNF="heal vnf") +JOB_ERROR_CODE = enum(NORMAL=0, PACKAGE_EXIST=1, CATALOG_EXCEPTION=2, SYSTEM_ERROR=3) class JobUtil(object): |