aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main
diff options
context:
space:
mode:
authorMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-07-30 15:33:03 +0200
committerMateusz Gołuchowski <mateusz.goluchowski@nokia.com>2020-07-31 15:49:59 +0200
commit4180d54d46aebca6bba531241d01759615887e2c (patch)
tree54891ffeb08e1ec298f06dd469321b0951cc1908 /bpmn/MSOCommonBPMN/src/main
parent57447eb2210e8d15f0f20c7f1b6b1a53db558102 (diff)
Create DeactivatePnfBB and include it into Service-Macro-Delete flow.
- created DeactivatePnfBB which changes orchestration status to inventoried when invoked - included BB into flow in R_MacroData script which initializes database - added support for mapping of service relations to PNFs - changed version of logging-analytics to 1.6.7 Issue-ID: SO-3111 Change-Id: I375db2014887f1f634adac31d4d1af3675f5911c Signed-off-by: Mateusz Goluchowski <mateusz.goluchowski@nokia.com>
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java15
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java5
2 files changed, 20 insertions, 0 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 0cdf8a6e5d..e65e1a8471 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
@@ -62,6 +62,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Tenant;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Vnfc;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
@@ -1854,6 +1855,7 @@ public class BBInputSetup implements JavaDelegate {
this.mapOwningEntity(relationships.getByType(AAIObjectType.OWNING_ENTITY), serviceInstance);
this.mapL3Networks(relationships.getRelatedAAIUris(AAIObjectType.L3_NETWORK), serviceInstance.getNetworks());
this.mapGenericVnfs(relationships.getRelatedAAIUris(AAIObjectType.GENERIC_VNF), serviceInstance.getVnfs());
+ this.mapPnfs(relationships.getRelatedAAIUris(AAIObjectType.PNF), serviceInstance.getPnfs());
this.mapCollection(relationships.getByType(AAIObjectType.COLLECTION), serviceInstance);
this.mapConfigurations(relationships.getRelatedAAIUris(AAIObjectType.CONFIGURATION),
serviceInstance.getConfigurations());
@@ -1905,6 +1907,19 @@ public class BBInputSetup implements JavaDelegate {
return genericVnf;
}
+ protected void mapPnfs(List<AAIResourceUri> list, List<Pnf> pnfs) {
+ for (AAIResourceUri aaiResourceUri : list) {
+ pnfs.add(this.mapPnf(aaiResourceUri));
+ }
+ }
+
+ protected Pnf mapPnf(AAIResourceUri aaiResourceUri) {
+ AAIResultWrapper aaiPnfWrapper = this.bbInputSetupUtils.getAAIResourceDepthOne(aaiResourceUri);
+ Optional<org.onap.aai.domain.yang.Pnf> aaiPnfWrapperOp =
+ aaiPnfWrapper.asBean(org.onap.aai.domain.yang.Pnf.class);
+ return aaiPnfWrapperOp.map(pnf -> this.mapperLayer.mapAAIPnfIntoPnf(pnf)).orElse(null);
+ }
+
protected List<InstanceGroup> mapInstanceGroups(List<AAIResultWrapper> instanceGroups) {
List<InstanceGroup> instanceGroupsList = new ArrayList<>();
for (AAIResultWrapper volumeGroupWrapper : instanceGroups) {
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 67d073d7b6..2bb383e4ec 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -52,6 +52,7 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.Subnet;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Tenant;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Vnfc;
+import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VolumeGroup;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding;
import org.onap.so.bpmn.servicedecomposition.entities.ResourceKey;
@@ -323,6 +324,10 @@ public class BBInputSetupMapperLayer {
return genericVnf;
}
+ protected Pnf mapAAIPnfIntoPnf(org.onap.aai.domain.yang.Pnf aaiPnf) {
+ return modelMapper.map(aaiPnf, Pnf.class);
+ }
+
protected void mapAllLicensesIntoGenericVnf(org.onap.aai.domain.yang.GenericVnf aaiGenericVnf,
GenericVnf genericVnf) {
if (aaiGenericVnf.getLicenses() != null) {