aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter/src
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-25 17:08:41 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2019-01-28 14:39:43 -0500
commitfe91155454a27401e8c23780fa247c0ede196747 (patch)
tree26d0f2e56d9b31283c5f2173c5e765d035187137 /adapters/mso-requests-db-adapter/src
parentd62389df8c10d46609c5770b45697f7ac401dc82 (diff)
parentfe76d074a452e58d4122cc234d17e7aa407a1b44 (diff)
Merge 'origin/casablanca' into master
Issue-ID: SO-1435 Change-Id: If065ef5c91e769452fd6701fa6c28a23b4bdf2b2 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
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;
+
+