add new action ConfigScaleIn
[appc.git] / appc-dispatcher / appc-dispatcher-common / domain-model-lib / src / main / java / org / onap / appc / domainmodel / lcm / VNFOperation.java
index 228005d..95557aa 100644 (file)
@@ -2,9 +2,11 @@
  * ============LICENSE_START=======================================================
  * ONAP : APPC
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications Copyright (C) 2018-2019 Orange Nokia
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  * ============LICENSE_END=========================================================
  */
 
 package org.onap.appc.domainmodel.lcm;
 
 public enum VNFOperation {
-    Configure, Test, HealthCheck, Start, Terminate, Restart, Rebuild, Stop, ConfigModify,
-    ConfigScaleOut,ConfigRestore,Backup, Snapshot,
-    SoftwareUpload, LiveUpgrade, Rollback, Test_lic, Migrate, Evacuate,StopApplication, StartApplication,
-    Sync(OperationType.ReadOnly), Audit(OperationType.ReadOnly),
-    ConfigBackup(OperationType.ReadOnly),ConfigBackupDelete(OperationType.ReadOnly),ConfigExport(OperationType.ReadOnly),
-    Lock(OperationType.BuiltIn), Unlock(OperationType.BuiltIn), CheckLock(OperationType.BuiltIn);
-
-    private OperationType operationType;
+    ActionStatus,
+    AttachVolume,
+    Audit,
+    Backup,
+    CheckLock(true),
+    Configure,
+    ConfigBackup,
+    ConfigBackupDelete,
+    ConfigExport,
+    ConfigModify,
+    ConfigRestore,
+    ConfigScaleOut,
+    DetachVolume,
+    DistributeTraffic,
+    DistributeTrafficCheck,
+    Evacuate,
+    GetConfig,
+    HealthCheck,
+    LicenseManagement,
+    LiveUpgrade,
+    Lock(true),
+    Migrate,
+    PostEvacuate,
+    PostMigrate,
+    PostRebuild,
+    Provisioning,
+    PreConfigure,
+    PreEvacuate,
+    PreMigrate,
+    PreRebuild,
+    Query,
+    QuiesceTraffic,
+    ResumeTraffic,
+    Reboot,
+    Rebuild,
+    Restart,
+    Rollback,
+    Snapshot,
+    SoftwareUpload,
+    Start,
+    StartApplication,
+    StartTraffic,
+    StatusTraffic,
+    Stop,
+    StopApplication,
+    StopTraffic,
+    Sync,
+    Terminate,
+    Test,
+    Test_lic,
+    Unlock(true),
+    UpgradePreCheck,
+    UpgradeSoftware,
+    UpgradePostCheck,
+    UpgradeBackup,
+    UpgradeBackout,
+    ConfigScaleIn;
 
-    VNFOperation(OperationType operationType){
-        this.operationType=operationType;
-    }
+    private boolean builtIn;
 
     VNFOperation() {
-        this.operationType=OperationType.OrchestrationStatusUpdate;
+        this.builtIn = false;
     }
+
     /**
      * Operations handled directly by the RequestHandler without further call to DG are built-in operations.
      */
     public boolean isBuiltIn() {
-        return this.operationType.equals(OperationType.BuiltIn);
+        return builtIn;
     }
 
-    public OperationType getOperationType() {
-        return operationType;
+    VNFOperation(boolean builtIn) {
+        this.builtIn = builtIn;
     }
 
     public static VNFOperation findByString(String operationName) {
-        for(VNFOperation operation: VNFOperation.values()) {
-            if(operation.name().equals(operationName)) {
+        for (VNFOperation operation : VNFOperation.values()) {
+            if (operation.name().equals(operationName)) {
                 return operation;
             }
         }