Adding DistributeTrafficCheck LCM API
[appc.git] / appc-dispatcher / appc-dispatcher-common / domain-model-lib / src / main / java / org / onap / appc / domainmodel / lcm / VNFOperation.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * ================================================================================
9  * Modifications Copyright (C) 2018-2019 Orange
10  * =============================================================================
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  * 
15  *      http://www.apache.org/licenses/LICENSE-2.0
16  * 
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  * 
23  * ============LICENSE_END=========================================================
24  */
25
26 package org.onap.appc.domainmodel.lcm;
27
28 public enum VNFOperation {
29     ActionStatus,
30     AttachVolume,
31     Audit,
32     Backup,
33     CheckLock(true),
34     Configure,
35     ConfigBackup,
36     ConfigBackupDelete,
37     ConfigExport,
38     ConfigModify,
39     ConfigRestore,
40     ConfigScaleOut,
41     DetachVolume,
42     Evacuate,
43     HealthCheck,
44     LiveUpgrade,
45     Lock(true),
46     Migrate,
47     Query,
48     QuiesceTraffic,
49     ResumeTraffic,
50     DistributeTraffic,
51     DistributeTrafficCheck,
52     Reboot,
53     Rebuild,
54     Restart,
55     Rollback,
56     Snapshot,
57     SoftwareUpload,
58     Start,
59     StartApplication,
60     Stop,
61     StopApplication,
62     Sync,
63     Terminate,
64     Test,
65     Test_lic,
66     Unlock(true),
67     UpgradePreCheck,
68     UpgradeSoftware,
69     UpgradePostCheck,
70     UpgradeBackup,
71     UpgradeBackout;
72
73     private boolean builtIn;
74
75     VNFOperation() {
76         this.builtIn=false;
77     }
78
79     /**
80      * Operations handled directly by the RequestHandler without further call to DG are built-in operations.
81      */
82     public boolean isBuiltIn() {
83         return builtIn;
84     }
85
86     VNFOperation(boolean builtIn) {
87         this.builtIn = builtIn;
88     }
89
90     public static VNFOperation findByString(String operationName) {
91         for (VNFOperation operation : VNFOperation.values()) {
92             if (operation.name().equals(operationName)) {
93                 return operation;
94             }
95         }
96         return null;
97     }
98 }