summaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java
diff options
context:
space:
mode:
authorAnand <ac204h@att.com>2018-01-04 19:35:51 -0500
committerSkip Wonnell <skip@att.com>2018-01-08 22:09:50 +0000
commit36bcd566167f2f91c0e8e7a304fce5f6bc150776 (patch)
tree7ba7acfee7e520da83a2b6286ea464285bc8cf67 /appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java
parent38d293d605b42f88c9c82319ba848b4b81e45b64 (diff)
Include impacted changes for APPC-346,APPC-348
Issue-ID: APPC-347 Change-Id: I399bc2a1e0dfd481e103032a373bb80fce5baf41 Signed-off-by: Anand <ac204h@att.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java')
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ActionLevel.java6
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/CommonHeader.java8
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ExternalActionStatus.java36
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Flags.java29
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/OperationType.java29
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestModes.java39
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RequestStatus.java74
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/ResponseContext.java13
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/RuntimeContext.java37
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/Status.java17
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/TransactionRecord.java217
-rw-r--r--appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/onap/appc/domainmodel/lcm/VNFOperation.java66
12 files changed, 484 insertions, 87 deletions
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;
}
}