add new action ConfigScaleIn
[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 Nokia
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     ConfigScaleIn;
86
87     private boolean builtIn;
88
89     VNFOperation() {
90         this.builtIn = false;
91     }
92
93     /**
94      * Operations handled directly by the RequestHandler without further call to DG are built-in operations.
95      */
96     public boolean isBuiltIn() {
97         return builtIn;
98     }
99
100     VNFOperation(boolean builtIn) {
101         this.builtIn = builtIn;
102     }
103
104     public static VNFOperation findByString(String operationName) {
105         for (VNFOperation operation : VNFOperation.values()) {
106             if (operation.name().equals(operationName)) {
107                 return operation;
108             }
109         }
110         return null;
111     }
112 }