diff options
author | Priyadharshini <priyadharshini.b96@wipro.com> | 2020-03-31 15:01:56 +0530 |
---|---|---|
committer | Priyadharshini <priyadharshini.b96@wipro.com> | 2020-04-01 19:43:35 +0530 |
commit | 3b2a37a2abe81d05a1025e2e203361215f4008e4 (patch) | |
tree | ec94a9b604ad7afe943753159d8136d47f6cd998 /src/main/java/org/onap | |
parent | c8668c7cc6a38f454d24562050750cadfd323a6b (diff) |
Fix Category Check for E2E Network slicing use case
Issue-ID: EXTAPI-423
Signed-off-by: Priyadharshini <priyadharshini.b96@wipro.com>
Change-Id: I98af0879c71564e9ad9c6a7efb8cb57ae407e8f4
Diffstat (limited to 'src/main/java/org/onap')
4 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java b/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java index 2f0717d..e34beaa 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/ServiceOrderResource.java @@ -31,6 +31,8 @@ import org.onap.nbi.commons.JsonRepresentation; import org.onap.nbi.commons.MultiCriteriaRequestBuilder; import org.onap.nbi.commons.ResourceManagement; import org.onap.nbi.exceptions.ValidationException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Query; @@ -54,6 +56,8 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping(OnapComponentsUrlPaths.SERVICE_ORDER_PATH) public class ServiceOrderResource extends ResourceManagement { + private static final Logger LOGGER = LoggerFactory.getLogger(ServiceOrderResource.class); + @Autowired ServiceOrderService serviceOrderService; @@ -155,6 +159,7 @@ public class ServiceOrderResource extends ResourceManagement { } public ServiceOrder checkServiceOrder(ServiceOrder serviceOrder) { + LOGGER.debug("Checking Service order : {} ", serviceOrder.getId()); ServiceOrderInfo serviceOrderInfo = checkOrderConsistenceManager.checkServiceOrder(serviceOrder); if (serviceOrderInfo.isServiceOrderRejected()) { serviceOrderService.updateOrderState(serviceOrder, StateType.REJECTED); diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/utils/E2EServiceUtils.java b/src/main/java/org/onap/nbi/apis/serviceorder/utils/E2EServiceUtils.java index 086cd40..284bc91 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/utils/E2EServiceUtils.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/utils/E2EServiceUtils.java @@ -28,7 +28,7 @@ public class E2EServiceUtils { // and e2eServiceInstances )APIs for service CRUD // All E2E Services are required to be created in SDC under category "E2E Services" until SO fixes the // multiple API issue. - if (category.startsWith("e2e") || category.startsWith("CST")) { + if (category.startsWith("e2e") || category.startsWith("cst")) { e2eService = true; } } diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIServiceTypeManager.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIServiceTypeManager.java index 9cadb1e..4ee4491 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIServiceTypeManager.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/CreateAAIServiceTypeManager.java @@ -52,6 +52,7 @@ public class CreateAAIServiceTypeManager { String serviceTypeFromJson = serviceOrderItem.getService().getServicetype(); String serviceType = serviceTypeFromJson != null ? serviceTypeFromJson : (String) serviceOrderItemInfo.getCatalogResponse().get("name"); if (!serviceNameExistsInAAI(servicesInAaiForCustomer, serviceType)) { + LOGGER.debug("Creating AAI Service Type : {} ", serviceType); boolean serviceCreated = serviceOrderConsumerService.putServiceType( serviceOrderInfo.getSubscriberInfo().getGlobalSubscriberId(), serviceType, serviceOrder); if (!serviceCreated) { diff --git a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskManager.java b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskManager.java index 8cabd97..ad4901c 100644 --- a/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskManager.java +++ b/src/main/java/org/onap/nbi/apis/serviceorder/workflow/SOTaskManager.java @@ -50,6 +50,7 @@ public class SOTaskManager { Map<String, Long> internalIdOrderItemsMap = new HashMap<>();
if (orderItems != null) {
// first we save create all the execution tasks with order item id in relied tasks
+ LOGGER.debug("Creating {} relied tasks with order item id", orderItems.size());
for (ServiceOrderItem orderItem : orderItems) {
ExecutionTask task = new ExecutionTask();
task.setOrderItemId(orderItem.getId());
|