aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorsreeja gattagouni <sg00744975@techmahindra.com>2023-01-05 20:54:08 +0530
committerLukasz Rajewski <lukasz.rajewski@t-mobile.pl>2023-01-11 12:29:51 +0000
commit7a475e244b329f9f179d30c8fc96aed6045037ce (patch)
tree39cd89ae888fe95ed2f5231f9b9619f0cb0de776 /bpmn/MSOCommonBPMN/src/main
parentd04f54dedba3e4ade3ac92282c1e3a408a29e70b (diff)
Add or Delete a PNF to an Active Service
-This feature Enables adding or deleting a PNF to an active Service. Issue-ID: SO-4046 Change-ID:I73f97f986a817d423f92f8d925dcd0947b8a2503 Signed-off-by: sreeja gattagouni <sg00744975@techmahindra.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java10
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java10
2 files changed, 17 insertions, 3 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
index 9031294f41..0c5e2d1410 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java
@@ -1091,6 +1091,14 @@ public class BBInputSetup implements JavaDelegate {
}
}
}
+ if (ModelType.pnf == requestDetails.getModelInfo().getModelType()) {
+ for (RelatedInstanceList relatedInstanceList : requestDetails.getRelatedInstanceList()) {
+ if (ModelType.service == relatedInstanceList.getRelatedInstance().getModelInfo().getModelType()) {
+ modelVersionId = relatedInstanceList.getRelatedInstance().getModelInfo().getModelVersionId();
+ break;
+ }
+ }
+ }
Service service = bbInputSetupUtils.getCatalogServiceByModelUUID(modelVersionId);
if (service == null) {
@@ -1820,7 +1828,7 @@ public class BBInputSetup implements JavaDelegate {
/**
* setCloudConfiguration - set cloud info on a building block.
- *
+ *
* @param gBB
* @param cloudConfiguration
* @return CloudRegion
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
index 24f1e055e2..45361f81c6 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtils.java
@@ -9,9 +9,9 @@
* 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.
@@ -36,6 +36,7 @@ import org.onap.aai.domain.yang.GenericVnfs;
import org.onap.aai.domain.yang.InstanceGroup;
import org.onap.aai.domain.yang.L3Network;
import org.onap.aai.domain.yang.L3Networks;
+import org.onap.aai.domain.yang.Pnf;
import org.onap.aai.domain.yang.ServiceInstance;
import org.onap.aai.domain.yang.ServiceInstances;
import org.onap.aai.domain.yang.ServiceSubscription;
@@ -376,6 +377,11 @@ public class BBInputSetupUtils {
return getConcreteAAIResource(GenericVnf.class, AAIFluentTypeBuilder.network().genericVnf(vnfId));
}
+
+ public Pnf getAAIPnf(String pnfId) {
+ return getConcreteAAIResource(Pnf.class, AAIFluentTypeBuilder.network().pnf(pnfId));
+ }
+
public VpnBinding getAAIVpnBinding(String vpnBindingId) {
return getConcreteAAIResource(VpnBinding.class, AAIFluentTypeBuilder.network().vpnBinding(vpnBindingId));
}