2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2022 DTAG
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.so.bpmn.infrastructure.workflow.tasks.ebb.loader;
23 import org.onap.so.bpmn.infrastructure.workflow.tasks.Resource;
24 import org.onap.so.bpmn.infrastructure.workflow.tasks.WorkflowType;
25 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
26 import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetupUtils;
27 import org.onap.so.client.exception.ExceptionBuilder;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
30 import org.springframework.stereotype.Component;
31 import java.util.ArrayList;
32 import java.util.List;
35 public class NetworkSliceSubnetEBBLoader {
37 private static final Logger logger = LoggerFactory.getLogger(VnfEBBLoader.class);
39 private final BBInputSetupUtils bbInputSetupUtils;
40 private final BBInputSetup bbInputSetup;
41 private final WorkflowActionExtractResourcesAAI workflowActionUtils;
42 private final ExceptionBuilder exceptionBuilder;
44 NetworkSliceSubnetEBBLoader(BBInputSetupUtils bbInputSetupUtils, BBInputSetup bbInputSetup,
45 WorkflowActionExtractResourcesAAI workflowActionUtils, ExceptionBuilder exceptionBuilder) {
46 this.bbInputSetupUtils = bbInputSetupUtils;
47 this.bbInputSetup = bbInputSetup;
48 this.workflowActionUtils = workflowActionUtils;
49 this.exceptionBuilder = exceptionBuilder;
53 public List<Resource> setNetworkSliceSubnetResource(String serviceId) {
54 Resource networkSliceSubnetResource = new Resource(WorkflowType.NETWORK_SLICE_SUBNET, serviceId, false, null);
55 List<Resource> resourceList = new ArrayList<>();
56 resourceList.add(networkSliceSubnetResource);