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