diff options
author | Steve Smokowski <ss835w@att.com> | 2019-11-07 18:16:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-11-07 18:16:40 +0000 |
commit | e141aad67e997015bbb6798c790e6702d1894115 (patch) | |
tree | 6b7773f5252fb8b3f25ef3bdd9db2b0c2df0f41e /adapters/mso-requests-db-adapter/src/main | |
parent | 039059d50b8d72bd66febc8c9c9cdc19f7d1411c (diff) | |
parent | 1711d5575d770c51b529a4c43a9d5cfa38158559 (diff) |
Merge "remove unused columns infra active requests"
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/main')
3 files changed, 19 insertions, 8 deletions
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java index 4ec4cc7eb5..07d88c9abe 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/ArchiveInfraRequestsScheduler.java @@ -107,12 +107,8 @@ public class ArchiveInfraRequestsScheduler { for (InfraActiveRequests iar : requests) { ArchivedInfraRequests archivedInfra = new ArchivedInfraRequests(); try { - archivedInfra.setAaiServiceId(iar.getAaiServiceId()); - archivedInfra.setAction(iar.getAction()); archivedInfra.setAicCloudRegion(iar.getAicCloudRegion()); - archivedInfra.setAicNodeClli(iar.getAicNodeClli()); archivedInfra.setCallBackUrl(iar.getCallBackUrl()); - archivedInfra.setClientRequestId(iar.getClientRequestId()); archivedInfra.setConfigurationId(iar.getConfigurationId()); archivedInfra.setConfigurationName(iar.getConfigurationName()); archivedInfra.setCorrelator(iar.getCorrelator()); @@ -125,14 +121,12 @@ public class ArchiveInfraRequestsScheduler { archivedInfra.setOperationalEnvName(iar.getOperationalEnvName()); archivedInfra.setRequestUrl(iar.getRequestUrl()); archivedInfra.setProgress(iar.getProgress()); - archivedInfra.setProvStatus(iar.getProvStatus()); archivedInfra.setRequestAction(iar.getRequestAction()); archivedInfra.setRequestBody(iar.getRequestBody()); archivedInfra.setRequestId(iar.getRequestId()); archivedInfra.setRequestorId(iar.getRequestorId()); archivedInfra.setRequestScope(iar.getRequestScope()); archivedInfra.setRequestStatus(iar.getRequestStatus()); - archivedInfra.setRequestType(iar.getRequestType()); archivedInfra.setResponseBody(iar.getResponseBody()); archivedInfra.setServiceInstanceId(iar.getServiceInstanceId()); archivedInfra.setServiceInstanceName(iar.getServiceInstanceName()); 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 9d6a8b0529..6ecf5dc3f0 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 @@ -73,7 +73,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { String networkId, String vnfId, String vfModuleId, String volumeGroupId, String serviceInstanceName, String configurationId, String configurationName, String vfModuleName) throws MsoRequestsDbException { try { - InfraActiveRequests request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId); + InfraActiveRequests request = infraActive.findOneByRequestId(requestId); if (request == null) { String error = "Entity not found. Unable to retrieve MSO Infra Requests DB for Request ID " + requestId; throw new MsoRequestsDbException(error); @@ -147,7 +147,7 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { logger.debug("Call to MSO Infra RequestsDb adapter get method with request Id: {}", requestId); InfraActiveRequests request = null; try { - request = infraActive.findOneByRequestIdOrClientRequestId(requestId, requestId); + request = infraActive.findOneByRequestId(requestId); if (request == null) { String error = "Entity not found. Unable to retrieve MSO Infra Requests DB for Request ID " + requestId; throw new MsoRequestsDbException(error); diff --git a/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql new file mode 100644 index 0000000000..352fbfda21 --- /dev/null +++ b/adapters/mso-requests-db-adapter/src/main/resources/db/migration/V7.1__Drop_Columns_from_Infra_requests_archive_tables.sql @@ -0,0 +1,17 @@ +use requestdb; + +ALTER TABLE `infra_active_requests` DROP IF EXISTS `PROV_STATUS`; + +ALTER TABLE `archived_infra_requests` DROP IF EXISTS `PROV_STATUS`; + +ALTER TABLE `infra_active_requests` DROP IF EXISTS `ACTION`; + +ALTER TABLE `archived_infra_requests` DROP IF EXISTS `ACTION`; + +ALTER TABLE `infra_active_requests` DROP IF EXISTS `AAI_SERVICE_ID`; + +ALTER TABLE `archived_infra_requests` DROP IF EXISTS `AAI_SERVICE_ID`; + +ALTER TABLE `infra_active_requests` DROP IF EXISTS `REQUEST_TYPE`; + +ALTER TABLE `archived_infra_requests` DROP IF EXISTS `REQUEST_TYPE`; |