resolve job view issue
[vfc/nfvo/lcm.git] / lcm / jobs / enum.py
1 # Copyright 2019 ZTE Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 from lcm.pub.utils.enumutil import enum
16
17 JOB_STATUS = enum(
18     FINISH=1,
19     PROCESSING=0
20 )
21 JOB_MODEL_STATUS = enum(
22     ERROR='error',
23     FINISHED='finished',
24     PROCESSING='processing',
25     STARTED='started',
26     TIMEOUT='timeout'
27 )
28 JOB_TYPE = enum(
29     NS="NS",
30     VNF="VNF"
31 )
32 JOB_ACTION = enum(
33     CREATE="CREATE",
34     INSTANTIATE="INSTANTIATE",
35     UPDATE="UPDATE",
36     HEAL="HEAL",
37     GRANT="GRANT",
38     MANUAL_SCALE="MANUAL SCALE",
39     TERMINATE="TERMINATE"
40 )
41 JOB_PROGRESS = enum(
42     ERROR=255,
43     FINISHED=100,
44     PARTLY_FINISHED=101,
45     STARTED=0
46 )
47 JOB_ERROR_CODE = enum(
48     NO_ERROR="0",
49     ERROR="255"
50 )