summaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-requests-db-adapter/src')
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java11
-rw-r--r--adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java34
-rw-r--r--adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql11
3 files changed, 55 insertions, 1 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
index e28bdb2f96..0c2a49ae53 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -73,6 +73,17 @@ public interface MsoRequestsDbAdapter {
@WebParam(name = "reason") @XmlElement(required = false) String reason) throws MsoRequestsDbException;
@WebMethod
+ public void initServiceOperationStatus(
+ @WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
+ @WebParam(name = "operationId") @XmlElement(required = false) String operationId,
+ @WebParam(name = "operationType") @XmlElement(required = false) String operationType,
+ @WebParam(name = "userId") @XmlElement(required = false) String userId,
+ @WebParam(name = "result") @XmlElement(required = false) String result,
+ @WebParam(name = "operationContent") @XmlElement(required = false) String operationContent,
+ @WebParam(name = "progress") @XmlElement(required = false) String progress,
+ @WebParam(name = "reason") @XmlElement(required = false) String reason) throws MsoRequestsDbException;
+
+ @WebMethod
public void initResourceOperationStatus(@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId,
@WebParam(name = "operationId") @XmlElement(required = true) String operationId,
@WebParam(name = "operationType") @XmlElement(required = true) String operationType,
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index 893156ce7d..626e3568bc 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -220,6 +220,38 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
}
/**
+ * Init operation status <br>
+ *
+ * @param serviceId
+ * @param operationId
+ * @param operationType
+ * @param userId
+ * @param result
+ * @param operationContent
+ * @param progress
+ * @param reason
+ * @throws MsoRequestsDbException
+ * @since ONAP Casablanca Release
+ */
+ @Override
+ @Transactional
+ public void initServiceOperationStatus(String serviceId, String operationId, String operationType, String userId,
+ String result, String operationContent, String progress, String reason) throws MsoRequestsDbException {
+ OperationStatus operStatus = new OperationStatus();
+
+ operStatus.setOperationId(operationId);
+ operStatus.setServiceId(serviceId);
+ operStatus.setUserId(userId);
+ operStatus.setOperation(operationType);
+ operStatus.setReason(reason);
+ operStatus.setProgress(progress);
+ operStatus.setResult(result);
+ operStatus.setOperationContent(operationContent);
+ operStatus.setResult(result);
+ operationStatusRepository.save(operStatus);
+ }
+
+ /**
* init the operation status of all the resources <br>
*
* @param serviceId
@@ -306,7 +338,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
resStatus.setErrorCode(errorCode);
resStatus.setStatusDescription(statusDescription);
resourceOperationStatusRepository.save(resStatus);
-
+
updateOperationStatusBasedOnResourceStatus(resStatus);
}
diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql
new file mode 100644
index 0000000000..87401ade13
--- /dev/null
+++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V4.3__Expand_Column_Size.sql
@@ -0,0 +1,11 @@
+use requestdb;
+
+ALTER TABLE infra_active_requests
+ MODIFY IF EXISTS AIC_CLOUD_REGION varchar(50) NULL,
+ MODIFY IF EXISTS AIC_NODE_CLLI varchar(50) NULL;
+
+ALTER TABLE archived_infra_requests
+ MODIFY IF EXISTS AIC_CLOUD_REGION varchar(50) NULL,
+ MODIFY IF EXISTS AIC_NODE_CLLI varchar(50) NULL;
+
+