aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks')
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java9
-rwxr-xr-xbpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/NetworkSliceSubnetEBBLoader.java60
3 files changed, 68 insertions, 2 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 64ae9cb5e0..82f44bc802 100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -70,6 +70,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri;
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
+import org.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader.NetworkSliceSubnetEBBLoader;
import org.onap.so.bpmn.common.BBConstants;
import org.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader.PnfEBBLoader;
import org.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader.ServiceEBBLoader;
@@ -112,7 +113,7 @@ public class WorkflowAction {
private static final String VNF_TYPE = "vnfType";
private static final String CONFIGURATION = "Configuration";
private static final String SUPPORTEDTYPES =
- "vnfs|pnfs|cnfs|vfModules|networks|networkCollections|volumeGroups|serviceInstances|instanceGroups";
+ "vnfs|pnfs|cnfs|vfModules|networks|networkCollections|volumeGroups|serviceInstances|instanceGroups|NetworkSliceSubnet";
private static final String HOMINGSOLUTION = "Homing_Solution";
private static final String SERVICE_TYPE_TRANSPORT = "TRANSPORT";
private static final String SERVICE_TYPE_BONDING = "BONDING";
@@ -144,6 +145,8 @@ public class WorkflowAction {
private PnfEBBLoader pnfEBBLoader;
@Autowired
private ServiceEBBLoader serviceEBBLoader;
+ @Autowired
+ private NetworkSliceSubnetEBBLoader networkSliceSubnetEBBLoader;
public void setBbInputSetupUtils(BBInputSetupUtils bbInputSetupUtils) {
this.bbInputSetupUtils = bbInputSetupUtils;
@@ -300,6 +303,8 @@ public class WorkflowAction {
|| isPNFCreate(resourceType, requestAction)) {
resourceList = serviceEBBLoader.getResourceListForService(sIRequest, requestAction, execution,
serviceInstanceId, resourceId, aaiResourceIds);
+ } else if (resourceType == WorkflowType.NETWORK_SLICE_SUBNET) {
+ resourceList = networkSliceSubnetEBBLoader.setNetworkSliceSubnetResource(resourceId);
} else if (isPNFDelete(resourceType, requestAction)) {
pnfEBBLoader.traverseAAIPnf(execution, resourceList, workflowResourceIds.getServiceInstanceId(), resourceId,
aaiResourceIds);
@@ -840,7 +845,7 @@ public class WorkflowAction {
}
protected String convertTypeFromPlural(String type) {
- if (!type.matches(SUPPORTEDTYPES)) {
+ if (!type.matches(SUPPORTEDTYPES) || type.equals("NetworkSliceSubnet")) {
return type;
} else {
if (type.equals(SERVICE_INSTANCES)) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
index 7ffd066de5..06afe9a20c 100755
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionConstants.java
@@ -36,6 +36,7 @@ public final class WorkflowActionConstants {
public static final String ASSIGN_INSTANCE = "assignInstance";
public static final String CHILD_SERVICE = "ChildService";
public static final String CONFIGURATION = "Configuration";
+ public static final String NSSI = "Nssi";
public static final String CONTROLLER = "Controller";
public static final String CREATE_INSTANCE = "createInstance";
public static final String DEACTIVATE_INSTANCE = "deactivateInstance";
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/NetworkSliceSubnetEBBLoader.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/NetworkSliceSubnetEBBLoader.java
new file mode 100644
index 0000000000..1d58a16fa2
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/NetworkSliceSubnetEBBLoader.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2022 DTAG
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader;
+
+import org.onap.so.bpmn.infrastructure.workflow.tasks.Resource;
+import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowType;
+import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
+import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
+import org.onap.so.client.exception.ExceptionBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import java.util.ArrayList;
+import java.util.List;
+
+@Component
+public class NetworkSliceSubnetEBBLoader {
+
+ private static final Logger logger = LoggerFactory.getLogger(VnfEBBLoader.class);
+
+ private final BBInputSetupUtils bbInputSetupUtils;
+ private final BBInputSetup bbInputSetup;
+ private final WorkflowActionExtractResourcesAAI workflowActionUtils;
+ private final ExceptionBuilder exceptionBuilder;
+
+ NetworkSliceSubnetEBBLoader(BBInputSetupUtils bbInputSetupUtils, BBInputSetup bbInputSetup,
+ WorkflowActionExtractResourcesAAI workflowActionUtils, ExceptionBuilder exceptionBuilder) {
+ this.bbInputSetupUtils = bbInputSetupUtils;
+ this.bbInputSetup = bbInputSetup;
+ this.workflowActionUtils = workflowActionUtils;
+ this.exceptionBuilder = exceptionBuilder;
+ }
+
+
+ public List<Resource> setNetworkSliceSubnetResource(String serviceId) {
+ Resource networkSliceSubnetResource = new Resource(WorkflowType.NETWORK_SLICE_SUBNET, serviceId, false, null);
+ List<Resource> resourceList = new ArrayList<>();
+ resourceList.add(networkSliceSubnetResource);
+ return resourceList;
+ }
+}
+