diff options
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/domain-model-lib')
13 files changed, 519 insertions, 97 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml index 204e9f2e4..637b8566b 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/pom.xml @@ -1,19 +1,44 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ============LICENSE_START======================================================= + ONAP : APPC + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + ================================================================================ + Copyright (C) 2017 Amdocs + ============================================================================= + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + 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========================================================= + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.onap.appc</groupId> <artifactId>appc-dispatcher-common</artifactId> <version>1.3.0-SNAPSHOT</version> </parent> - <artifactId>domain-model-lib</artifactId> - <packaging>bundle</packaging> - - <name>domain-model-lib</name> - <url>http://maven.apache.org</url> + <artifactId>domain-model-lib</artifactId> + <packaging>bundle</packaging> + <name>APPC Dispatcher Common - Domain Model Lib</name> + <url>http://maven.apache.org</url> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> <build> <plugins> diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ActionLevel.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ActionLevel.java index 230812cef..8544ee427 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ActionLevel.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ActionLevel.java @@ -25,5 +25,9 @@ package org.onap.appc.domainmodel.lcm; public enum ActionLevel { - VNF,VM,VNFC + VNF, // Requests related to VNFs + VM, // Requests related to VMs + VNFC, // Requests related to VNFCs + MGMT // Requests that are applicable to prior requests (and are not applicable to VNF, VM, VNFC + } diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/CommonHeader.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/CommonHeader.java index 7c44efecb..8c7d73c11 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/CommonHeader.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/CommonHeader.java @@ -24,13 +24,13 @@ package org.onap.appc.domainmodel.lcm; -import java.time.Instant; +import java.util.Date; public class CommonHeader { private Flags flags; - private Instant timestamp; + private Date timestamp; private String apiVer; private String originatorId; private String requestId; @@ -44,11 +44,11 @@ public class CommonHeader { this.flags = flags; } - public Instant getTimeStamp() { + public Date getTimeStamp() { return timestamp; } - public void setTimestamp(Instant timestamp) { + public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ExternalActionStatus.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ExternalActionStatus.java new file mode 100644 index 000000000..aeaf3d94c --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ExternalActionStatus.java @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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; + +/** + * This class is a Enum class which provides value of external action status + */ +public enum ExternalActionStatus { + FAILED, + IN_PROGRESS, + SUCCESSFUL, + ABORTED, + NOT_FOUND +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Flags.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Flags.java index 4102955f0..ef151b1a6 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Flags.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Flags.java @@ -27,29 +27,38 @@ package org.onap.appc.domainmodel.lcm; public class Flags { - private final boolean force; - private final int ttl; - private final Mode mode; - - public Flags(Mode mode, boolean force, int ttl) { - super(); - this.force = force; - this.ttl = ttl; - this.mode = mode; - } + private boolean force; + private int ttl; + private Mode mode; public boolean isForce() { return force; } + public void setForce(boolean force) { + this.force = force; + } + public int getTtl() { return ttl; } + public void setTtl(int ttl) { + this.ttl = ttl; + } + public Mode getMode() { return mode; } + public void setMode(Mode mode) { + this.mode = mode; + } + + public void setMode(String mode) { + this.mode = Mode.valueOf(mode); + } + @Override public String toString() { return "Flags{" + diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/OperationType.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/OperationType.java deleted file mode 100644 index b5b017e40..000000000 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/OperationType.java +++ /dev/null @@ -1,29 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * 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 OperationType { - ReadOnly,BuiltIn,OrchestrationStatusUpdate,OperationStatusUpdate -} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestModes.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestModes.java new file mode 100644 index 000000000..36b761f58 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestModes.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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 RequestModes { + NORMAL("Normal"), + EXCLUSIVE("Exclusive"); + + private String mode; + RequestModes(String mode){ + this.mode=mode; + } + + public String getMode(){ + return mode; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestStatus.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestStatus.java new file mode 100644 index 000000000..0490e2cf5 --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestStatus.java @@ -0,0 +1,74 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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; + +/** + * This is a Enumeration class which introduces various Request Status + */ +public enum RequestStatus { + // Unknown request status + UNKNOWN(ExternalActionStatus.FAILED, "Status cannot be determined.",true), + // Request just entered in APPC boundaries + RECEIVED(ExternalActionStatus.IN_PROGRESS, "Request has been received.",false), + // APPC has accepted the request/transaction to process after applying various business rules/validation + ACCEPTED(ExternalActionStatus.IN_PROGRESS, "Request has been accepted and is in progress.",false), + // APPC decided to reject the request based on various applicable business rules/validation. + REJECTED(ExternalActionStatus.FAILED, "Request has been rejected.",true), + // APPC has processed the VNF management request without any errors + SUCCESSFUL(ExternalActionStatus.SUCCESSFUL, "Request has been successfully completed.",true), + // APPC encountered error during processing the VNF management request + FAILED(ExternalActionStatus.FAILED, "Request failed because of an error",true), + // APPC Timed out because of reason that is out of control of APPC. + TIMEOUT(ExternalActionStatus.FAILED, "Request failed because it timed out",true), + // APPC aborted the request + ABORTED(ExternalActionStatus.ABORTED, "Request was aborted",true), + // APPC cannot find any related request + NOT_FOUND(ExternalActionStatus.NOT_FOUND, "Request was not found",true); + + private ExternalActionStatus externalActionStatus; + private String description; + boolean terminal; + + RequestStatus(ExternalActionStatus externalActionStatus, String description, boolean terminal) { + this.externalActionStatus = externalActionStatus; + this.description = description; + this.terminal=terminal; + } + + public ExternalActionStatus getExternalActionStatus() { + return externalActionStatus; + } + + public String getExternalActionStatusName() { + return externalActionStatus.name(); + } + + public String getDescription() { + return description; + } + public boolean isTerminal() { + return terminal; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ResponseContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ResponseContext.java index da3a6be69..4386f0d08 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ResponseContext.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ResponseContext.java @@ -31,8 +31,11 @@ import java.util.Map; public class ResponseContext { private CommonHeader commonHeader; private Status status; - private String payload; private Map<String, String> additionalContext; + /** Carries json String response payload */ + private String payload; + /** Carries non-String response payload, such as List or Map of object */ + private Object payloadObject; public CommonHeader getCommonHeader() { return commonHeader; @@ -58,6 +61,14 @@ public class ResponseContext { this.payload = payload; } + public Object getPayloadObject() { + return payloadObject; + } + + public void setPayloadObject(Object payloadObject) { + this.payloadObject = payloadObject; + } + public Map<String, String> getAdditionalContext() { return additionalContext; } diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RuntimeContext.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RuntimeContext.java index 4458e2619..b4ffe3482 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RuntimeContext.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RuntimeContext.java @@ -32,10 +32,10 @@ public class RuntimeContext { private RequestContext requestContext; private ResponseContext responseContext; private VNFContext vnfContext; + private TransactionRecord transactionRecord; //TODO move fields timeStart abd isLockAcquired to a better place private Instant timeStart; - private boolean isLockAcquired; private String rpcName; public String getRpcName() { @@ -46,22 +46,6 @@ public class RuntimeContext { this.rpcName = rpcName; } - public Instant getTimeStart() { - return timeStart; - } - - public boolean isLockAcquired() { - return isLockAcquired; - } - - public void setIsLockAcquired(boolean isLockAcquired) { - this.isLockAcquired = isLockAcquired; - } - - public void setTimeStart(Instant timeStart) { - this.timeStart = timeStart; - } - public RequestContext getRequestContext() { return requestContext; } @@ -78,6 +62,14 @@ public class RuntimeContext { this.responseContext = responseContext; } + public Instant getTimeStart() { + return timeStart; + } + + public void setTimeStart(Instant timeStart) { + this.timeStart = timeStart; + } + public VNFContext getVnfContext() { return vnfContext; } @@ -86,6 +78,16 @@ public class RuntimeContext { this.vnfContext = vnfContext; } + + public TransactionRecord getTransactionRecord() { + return transactionRecord; + } + + public void setTransactionRecord(TransactionRecord transactionRecord) { + this.transactionRecord = transactionRecord; + } + + @Override public String toString() { return "RuntimeContext{" + @@ -93,7 +95,6 @@ public class RuntimeContext { ", responseContext=" + responseContext + ", vnfContext=" + vnfContext + ", timeStart=" + timeStart + - ", isLockAcquired=" + isLockAcquired + ", rpcName='" + rpcName + '\'' + '}'; } diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Status.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Status.java index 2f8fd1950..2c9725fed 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Status.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Status.java @@ -27,22 +27,25 @@ package org.onap.appc.domainmodel.lcm; public class Status { - private final int code; - private final String message; - - public Status(int code, String message) { - this.code = code; - this.message = message; - } + private int code; + private String message; public int getCode() { return code; } + public void setCode(int code) { + this.code = code; + } + public String getMessage() { return message; } + public void setMessage(String value) { + this.message = value; + } + @Override public String toString() { return "Status{" + diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/TransactionRecord.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/TransactionRecord.java new file mode 100644 index 000000000..16b32db0a --- /dev/null +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/TransactionRecord.java @@ -0,0 +1,217 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP : APPC + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Copyright (C) 2017 Amdocs + * ============================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * 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; + +import java.time.Instant; + + +public class TransactionRecord { + + private String transactionId; + private Instant originTimestamp; + private String requestId; + private String subRequestId; + private String originatorId; + private Instant startTime; + private Instant endTime; + private String targetId; + private String targetType; + private VNFOperation operation; + private int resultCode; + private String description; + private RequestStatus requestState; + private String serviceInstanceId; + private String vnfcName; + private String vserverId; + private String vfModuleId; + private Flags.Mode mode; + + public Instant getOriginTimestamp() { + return originTimestamp; + } + + public void setOriginTimestamp(Instant originTimestamp) { + this.originTimestamp = originTimestamp; + } + + public Instant getStartTime() { + return startTime; + } + + public void setStartTime(Instant startTime) { + this.startTime = startTime; + } + + public Instant getEndTime() { + return endTime; + } + + public void setEndTime(Instant endTime) { + this.endTime = endTime; + } + + public String getMode() { + return mode.name(); + } + + public void setMode(Flags.Mode mode) { + this.mode=mode; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getServiceInstanceId() { + return serviceInstanceId; + } + + public void setServiceInstanceId(String serviceInstanceId) { + this.serviceInstanceId = serviceInstanceId; + } + + public String getVnfcName() { + return vnfcName; + } + + public void setVnfcName(String vnfcName) { + this.vnfcName = vnfcName; + } + + public String getVserverId() { + return vserverId; + } + + public void setVserverId(String vserverId) { + this.vserverId = vserverId; + } + + public String getVfModuleId() { + return vfModuleId; + } + + public void setVfModuleId(String vfModuleId) { + this.vfModuleId = vfModuleId; + } + + public String getTargetType() { + return targetType; + } + + public void setTargetType(String targetType) { + this.targetType = targetType; + } + + public VNFOperation getOperation() { + return operation; + } + + public void setOperation(VNFOperation operation) { + this.operation = operation; + } + + public int getResultCode() { + return resultCode; + } + + public void setResultCode(int resultCode) { + this.resultCode = resultCode; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getRequestState() { + return requestState.name(); + } + + public void setRequestState(RequestStatus requestState) { + this.requestState = requestState; + } + + public String getOriginatorId() { + return originatorId; + } + + public void setOriginatorId(String originatorId) { + this.originatorId = originatorId; + } + + public String getRequestId() { + return requestId; + } + + public void setRequestId(String requestId) { + this.requestId = requestId; + } + + public String getSubRequestId() { + return subRequestId; + } + + public void setSubRequestId(String subRequestId) { + this.subRequestId = subRequestId; + } + + public String getTargetId() { + return targetId; + } + + public void setTargetId(String targetId) { + this.targetId = targetId; + } + + @Override + public String toString() { + return "TransactionRecord{" + + "transactionId='" + transactionId + '\'' + + ", originTimestamp=" + originTimestamp + + ", requestId='" + requestId + '\'' + + ", subRequestId='" + subRequestId + '\'' + + ", originatorId='" + originatorId + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + ", targetId='" + targetId + '\'' + + ", targetType='" + targetType + '\'' + + ", operation='" + operation + '\'' + + ", resultCode='" + resultCode + '\'' + + ", description='" + description + '\'' + + ", requestState='" + requestState + '\'' + + ", serviceInstanceId='" + serviceInstanceId + '\'' + + ", vnfcName='" + vnfcName + '\'' + + ", vserverId='" + vserverId + '\'' + + ", vfModuleId='" + vfModuleId + '\'' + + '}'; + } +} diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/VNFOperation.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/VNFOperation.java index 228005d34..77ebe43b6 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/VNFOperation.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/VNFOperation.java @@ -25,36 +25,68 @@ 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); + ActionStatus, + AttachVolume, + Audit, + Backup, + CheckLock(true), + Configure, + ConfigBackup, + ConfigBackupDelete, + ConfigExport, + ConfigModify, + ConfigRestore, + ConfigScaleOut, + DetachVolume, + Evacuate, + HealthCheck, + LiveUpgrade, + Lock(true), + Migrate, + Query, + QuiesceTraffic, + ResumeTraffic, + Reboot, + Rebuild, + Restart, + Rollback, + Snapshot, + SoftwareUpload, + Start, + StartApplication, + Stop, + StopApplication, + Sync, + Terminate, + Test, + Test_lic, + Unlock(true), + UpgradePreCheck, + UpgradeSoftware, + UpgradePostCheck, + UpgradeBackup, + UpgradeBackout; - private OperationType operationType; - - 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; } } |