Merge "VFModule To HeatTemplateUUID" into dublin
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Mon, 6 May 2019 11:42:51 +0000 (11:42 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 6 May 2019 11:42:51 +0000 (11:42 +0000)
asdc-controller/pom.xml
asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
bpmn/MSOCommonBPMN/pom.xml
docs/architecture/SO Internal Arc.pptx

index 8317b66..60c517d 100644 (file)
@@ -16,8 +16,8 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
     <antlr.version>4.7.1</antlr.version>
     <java.version>1.8</java.version>
-    <sdc.tosca.version>1.5.0</sdc.tosca.version>
-    <jtosca.version>1.5.0</jtosca.version>
+    <sdc.tosca.version>1.5.1</sdc.tosca.version>
+    <jtosca.version>1.5.1</jtosca.version>
   </properties>
 
   <build>
index 1a80264..ad3e2d8 100644 (file)
@@ -85,6 +85,7 @@ import org.onap.so.db.catalog.beans.HeatEnvironment;
 import org.onap.so.db.catalog.beans.HeatFiles;
 import org.onap.so.db.catalog.beans.HeatTemplate;
 import org.onap.so.db.catalog.beans.HeatTemplateParam;
+import org.onap.so.db.catalog.beans.InstanceGroup;
 import org.onap.so.db.catalog.beans.InstanceGroupType;
 import org.onap.so.db.catalog.beans.NetworkCollectionResourceCustomization;
 import org.onap.so.db.catalog.beans.NetworkInstanceGroup;
@@ -1729,16 +1730,25 @@ public class ToscaResourceInstaller {
             VnfResourceCustomization vnfResourceCustomization, ToscaResourceStructure toscaResourceStructure) {
 
         Metadata instanceMetadata = group.getMetadata();
-        // Populate InstanceGroup
+
+        InstanceGroup existingInstanceGroup =
+                instanceGroupRepo.findByModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+
         VFCInstanceGroup vfcInstanceGroup = new VFCInstanceGroup();
 
-        vfcInstanceGroup.setModelName(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
-        vfcInstanceGroup.setModelInvariantUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
-        vfcInstanceGroup.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
-        vfcInstanceGroup.setModelVersion(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
-        vfcInstanceGroup.setToscaNodeType(group.getType());
-        vfcInstanceGroup.setRole("SUB-INTERFACE"); // Set Role
-        vfcInstanceGroup.setType(InstanceGroupType.VNFC); // Set type
+        if (existingInstanceGroup == null) {
+            // Populate InstanceGroup
+            vfcInstanceGroup.setModelName(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_NAME));
+            vfcInstanceGroup
+                    .setModelInvariantUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_INVARIANTUUID));
+            vfcInstanceGroup.setModelUUID(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_UUID));
+            vfcInstanceGroup.setModelVersion(instanceMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_VERSION));
+            vfcInstanceGroup.setToscaNodeType(group.getType());
+            vfcInstanceGroup.setRole("SUB-INTERFACE"); // Set Role
+            vfcInstanceGroup.setType(InstanceGroupType.VNFC); // Set type
+        } else {
+            vfcInstanceGroup = (VFCInstanceGroup) existingInstanceGroup;
+        }
 
         // Populate VNFCInstanceGroupCustomization
         VnfcInstanceGroupCustomization vfcInstanceGroupCustom = new VnfcInstanceGroupCustomization();
index 891a57d..20be69c 100644 (file)
       <groupId>org.glassfish.jersey.media</groupId>
       <artifactId>jersey-media-json-jackson</artifactId>
     </dependency>
-    <dependency>
-      <groupId>org.onap.sdc.sdc-tosca</groupId>
-      <artifactId>sdc-tosca</artifactId>
-      <version>1.4.4</version>
-    </dependency>
-    <dependency>
-      <groupId>org.onap.sdc.jtosca</groupId>
-      <artifactId>jtosca</artifactId>
-      <version>1.4.4</version>
-    </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-test</artifactId>
index bff3e35..ee4b112 100644 (file)
Binary files a/docs/architecture/SO Internal Arc.pptx and b/docs/architecture/SO Internal Arc.pptx differ