Merge "Update python2 to python3"
[vfc/nfvo/lcm.git] / lcm / pub / 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     CREATE_VNF="create vnf",
30     HEAL_VNF="heal vnf",
31     GRANT_VNF="grant vnf",
32     MANUAL_SCALE_VNF="manual scale vnf",
33     TERMINATE_NS="terminate ns",
34     TERMINATE_VNF="terminate vnf",
35     UPDATE_NS="update ns"
36 )
37 JOB_PROGRESS = enum(
38     ERROR=255,
39     FINISHED=100,
40     PARTLY_FINISHED=101,
41     STARTED=0
42 )
43 JOB_ERROR_CODE = enum(
44     NO_ERROR="0",
45     ERROR="255"
46 )