From 4f82c56ca62b266d007f240c7b57d11cadd5f0b3 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Tue, 18 Jun 2019 17:04:18 -0400 Subject: support no payload for alacarte deletes Swap to using HTTP Enumerations rather than ints Add Unit Tests to Service Instances endpoint Add Vnf Tests remove Abstract class Clean up usage of abstract classes Fix volume and module bean wiring issues Add logic to find create request if cloud not in AAI Updated network to take in version pathparam Additonal refactor of the endpoints Add missing license headers to all files Clean up public variable usage, move to protected Change-Id: Icdbdf78aa6c8af7a30fdff8a5805103f8df9364d Issue-ID: SO-2032 Signed-off-by: Benjamin, Max (mb388a) --- .../db/request/data/repository/ArchivedInfraRequestsRepository.java | 6 +++++- .../db/request/data/repository/InfraActiveRequestsRepository.java | 3 +++ .../request/data/repository/InfraActiveRequestsRepositoryImpl.java | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'mso-api-handlers/mso-requests-db-repositories/src') diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java index 8657892c34..8566afe9e1 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/ArchivedInfraRequestsRepository.java @@ -20,12 +20,16 @@ package org.onap.so.db.request.data.repository; +import java.util.List; import org.onap.so.db.request.beans.ArchivedInfraRequests; +import org.onap.so.db.request.beans.InfraActiveRequests; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; -import org.springframework.stereotype.Repository; @RepositoryRestResource(collectionResourceRel = "archivedInfraRequests", path = "archivedInfraRequests") public interface ArchivedInfraRequestsRepository extends JpaRepository { + List findByActionAndRequestStatusAndVfModuleId(String action, String requestStatus, + String vfModuleId); + } diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java index 29be0ddc00..a14699827d 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java @@ -37,6 +37,9 @@ public interface InfraActiveRequestsRepository InfraActiveRequests findOneByRequestIdOrClientRequestIdAndRequestType(String requestId, String clientRequestId, String requestType); + List findByActionAndRequestStatusAndVfModuleId(String action, String requestStatus, + String vfModuleId); + InfraActiveRequests findOneByRequestId(String string); InfraActiveRequests findOneByRequestBody(String requestBody); diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java index 3c4b1fa66b..d8c7c8f971 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java @@ -92,7 +92,8 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep protected static final String OPENV = "operationalEnvironment"; private static final List VALID_COLUMNS = - Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS); + Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS, + VFMODULE_INSTANCE_ID, VNF_INSTANCE_ID, NETWORK_INSTANCE_ID, VOLUME_GROUP_INSTANCE_ID); /* -- cgit 1.2.3-korg