Add new LCM actions GetConfig, StartTraffic, StopTraffic, etc
[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     DistributeTraffic,
43     DistributeTrafficCheck,
44     Evacuate,
45     GetConfig,
46     HealthCheck,
47     LicenseManagement,
48     LiveUpgrade,
49     Lock(true),
50     Migrate,
51     PostEvacuate,
52     PostMigrate,
53     PostRebuild,
54     Provisioning,
55     PreConfigure,
56     PreEvacuate,
57     PreMigrate,
58     PreRebuild,
59     Query,
60     QuiesceTraffic,
61     ResumeTraffic,
62     Reboot,
63     Rebuild,
64     Restart,
65     Rollback,
66     Snapshot,
67     SoftwareUpload,
68     Start,
69     StartApplication,
70     StartTraffic,
71     StatusTraffic,
72     Stop,
73     StopApplication,
74     StopTraffic,
75     Sync,
76     Terminate,
77     Test,
78     Test_lic,
79     Unlock(true),
80     UpgradePreCheck,
81     UpgradeSoftware,
82     UpgradePostCheck,
83     UpgradeBackup,
84     UpgradeBackout;
85
86     private boolean builtIn;
87
88     VNFOperation() {
89         this.builtIn = false;
90     }
91
92     /**
93      * Operations handled directly by the RequestHandler without further call to DG are built-in operations.
94      */
95     public boolean isBuiltIn() {
96         return builtIn;
97     }
98
99     VNFOperation(boolean builtIn) {
100         this.builtIn = builtIn;
101     }
102
103     public static VNFOperation findByString(String operationName) {
104         for (VNFOperation operation : VNFOperation.values()) {
105             if (operation.name().equals(operationName)) {
106                 return operation;
107             }
108         }
109         return null;
110     }
111 }