Task to add ConfigScaleOut to LCM API, Yang Model.
[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  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.domainmodel.lcm;
26
27 public enum VNFOperation {
28     ActionStatus,
29     AttachVolume,
30     Audit,
31     Backup,
32     CheckLock(true),
33     Configure,
34     ConfigBackup,
35     ConfigBackupDelete,
36     ConfigExport,
37     ConfigModify,
38     ConfigRestore,
39     ConfigScaleOut,
40     DetachVolume,
41     Evacuate,
42     HealthCheck,
43     LiveUpgrade,
44     Lock(true),
45     Migrate,
46     Query,
47     QuiesceTraffic,
48     ResumeTraffic,
49     Reboot,
50     Rebuild,
51     Restart,
52     Rollback,
53     Snapshot,
54     SoftwareUpload,
55     Start,
56     StartApplication,
57     Stop,
58     StopApplication,
59     Sync,
60     Terminate,
61     Test,
62     Test_lic,
63     Unlock(true),
64     UpgradePreCheck,
65     UpgradeSoftware,
66     UpgradePostCheck,
67     UpgradeBackup,
68     UpgradeBackout;
69
70     private boolean builtIn;
71
72     VNFOperation() {
73         this.builtIn=false;
74     }
75
76     /**
77      * Operations handled directly by the RequestHandler without further call to DG are built-in operations.
78      */
79     public boolean isBuiltIn() {
80         return builtIn;
81     }
82
83     VNFOperation(boolean builtIn) {
84         this.builtIn = builtIn;
85     }
86
87     public static VNFOperation findByString(String operationName) {
88         for (VNFOperation operation : VNFOperation.values()) {
89             if (operation.name().equals(operationName)) {
90                 return operation;
91             }
92         }
93         return null;
94     }
95 }