Update FlatEntity in TOSCA 05/36705/4
authorshiria <shiri.amichai@amdocs.com>
Mon, 19 Mar 2018 13:23:23 +0000 (15:23 +0200)
committershiria <shiri.amichai@amdocs.com>
Thu, 22 Mar 2018 06:21:36 +0000 (08:21 +0200)
Add support of dataType entity flat hierarchy in TOSCA
Fix existing nodeType entity flat hierarchy in TOSCA

Change-Id: I52cd188c595a263c70c2067fd1aac9752f7e24a4
Issue-ID: SDC-1147
Signed-off-by: shiria <shiri.amichai@amdocs.com>
60 files changed:
openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/CommonMethods.java
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedwithoutNodeTemplates/expectedoutputfiles/module_1_perimeta_swmu_b_childServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/nestedArrayParam/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/VMInterfaceToNettworkConnection/sharedAddOn/expectedoutputfiles/addOnServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressStaticValue/expectedoutputfiles/vmme_vlcServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueInProperForm/expectedoutputfiles/vmme_vlcServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapOneItem/expectedoutputfiles/vmme_vlcServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueMapTwoItems/expectedoutputfiles/vmme_vlcServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/contrailv2VMinterface/macAddressesValueNotAList/expectedoutputfiles/vmme_vlcServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/connectivityBetweenPatterns/out/Nested_1c2_catalog_instanceServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/dependencyConnectivity/out/Nested_1c2_catalog_instanceServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/mixPatterns/oneAppearancePerPattern/out/Nested_1c2_catalog_instanceServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/allPatternsDependsOnConnectivity/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/allPatternsDependsOnConnectivity/out/nested-pattern-4-same-typeServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/portSecurityGroupNetPattern1B/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedOtherScenarios/multiLevel/portSecurityGroupNetPattern1B/out/nested3ServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedSingleCompute/multipleReferencesToSameNestedFilesWithSameComputeType/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/fulltest/nestedSingleCompute/multipleReferencesToSameNestedFilesWithSameComputeType/out/nested_vson_server_with_vol_dual_ip_stackServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/novatovolumeconnection/nestednotconnected/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttocontrailv2virtualnetworkconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/nested/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetconnection/shared/expectedoutputfiles/nested2ServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/porttonetresourcegroupconnection/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityrulestoportnestedconnection/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityrulestoportconnection/securityruletosharedportlinking/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/securityruletosharedportresourcegrouplinking/expectedoutputfiles/nestedServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithIndex/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithIndex/out/SubstitutionServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithOutputParameters/consolidation/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithOutputParameters/consolidation/out/SubstitutionServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithOutputParameters/noConsolidation/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/WithOutputParameters/noConsolidation/out/SubstitutionServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/updNodesGetAttrInFromInnerNodes/consolidation/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/updNodesGetAttrInFromInnerNodes/consolidation/out/SubstitutionServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/updNodesGetAttrInFromInnerNodes/noConsolidation/out/GlobalSubstitutionTypesServiceTemplate.yaml
openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/services/heattotosca/unifiedComposition/creSubstitutionServiceTemplate/updNodesGetAttrInFromInnerNodes/noConsolidation/out/SubstitutionServiceTemplate.yaml
openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java [new file with mode: 0644]
openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImpl.java
openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaAnalyzerServiceImplTest.java
openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/NestedServiceTemplateReqTest.yaml

index 7f207c5..cc92441 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -347,17 +347,18 @@ public class CommonMethods {
    *
    * @param <T>    the type parameter
    * @param <S>    the type parameter
-   * @param target the target
-   * @param source the source
+   * @param firstMap the firstMap
+   * @param secondMap the secondMap
    * @return the map
+   * Second Map is overridden data from the first map
    */
-  public static <T, S> Map<T, S> mergeMaps(Map<T, S> target, Map<T, S> source) {
+  public static <T, S> Map<T, S> mergeMaps(Map<T, S> firstMap, Map<T, S> secondMap) {
     Map<T, S> retMap = new HashMap<>();
-    if (MapUtils.isNotEmpty(source)) {
-      retMap.putAll(source);
+    if (MapUtils.isNotEmpty(firstMap)) {
+      retMap.putAll(firstMap);
     }
-    if (MapUtils.isNotEmpty(target)) {
-      retMap.putAll(target);
+    if (MapUtils.isNotEmpty(secondMap)) {
+      retMap.putAll(secondMap);
     }
     return retMap;
   }
index 08611c0..29a1ada 100644 (file)
@@ -2021,13 +2021,13 @@ node_types:
         occurrences:\r
         - 1\r
         - UNBOUNDED\r
-      attachment_perimeta_ssc_b_mgmt_0_port:\r
-        type: tosca.capabilities.Attachment\r
+      feature_perimeta_ssc_b_mgmt_0_port:\r
+        type: tosca.capabilities.Node\r
         occurrences:\r
         - 1\r
         - UNBOUNDED\r
-      feature_perimeta_ssc_b_mgmt_0_port:\r
-        type: tosca.capabilities.Node\r
+      attachment_perimeta_ssc_b_mgmt_0_port:\r
+        type: tosca.capabilities.Attachment\r
         occurrences:\r
         - 1\r
         - UNBOUNDED\r
@@ -3706,4 +3706,4 @@ node_types:
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.\r
         occurrences:\r
         - 1\r
-        - UNBOUNDED\r
\ No newline at end of file
+        - UNBOUNDED\r
index 20b8002..2eb36bf 100644 (file)
@@ -860,12 +860,12 @@ topology_template:
       disk.device.write.requests.rate_perimeta_ssc_b_server_0:\r
       - perimeta_ssc_b_server_0\r
       - disk.device.write.requests.rate\r
-      attachment_perimeta_ssc_b_mgmt_0_port:\r
-      - perimeta_ssc_b_mgmt_0_port\r
-      - attachment\r
       feature_perimeta_ssc_b_mgmt_0_port:\r
       - perimeta_ssc_b_mgmt_0_port\r
       - feature\r
+      attachment_perimeta_ssc_b_mgmt_0_port:\r
+      - perimeta_ssc_b_mgmt_0_port\r
+      - attachment\r
       network.incoming.bytes.rate_perimeta_ssc_b_mgmt_0_port:\r
       - perimeta_ssc_b_mgmt_0_port\r
       - network.incoming.bytes.rate\r
@@ -923,4 +923,4 @@ topology_template:
       - dependency\r
       link_perimeta_ssc_b_ha_0_port:\r
       - perimeta_ssc_b_ha_0_port\r
-      - link
\ No newline at end of file
+      - link\r
index 27a8565..288f5fd 100644 (file)
@@ -146,12 +146,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -159,6 +153,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index e902c09..12536ea 100644 (file)
@@ -151,12 +151,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index ad6cab2..24ab455 100644 (file)
@@ -147,12 +147,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -160,6 +154,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 34b06b1..afaf46e 100644 (file)
@@ -156,12 +156,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 95b4b65..909ec38 100644 (file)
@@ -1035,12 +1035,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -1048,6 +1042,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 77aac1d..98d8e51 100644 (file)
@@ -136,12 +136,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 927c36d..394685a 100644 (file)
@@ -178,12 +178,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 7d30878..4d3f799 100644 (file)
@@ -101,12 +101,12 @@ topology_template:
       forwarder_template_VMInt_INT1_VLC_1:
       - template_VMInt_INT1_VLC_1
       - forwarder
-      binding_template_VMInt_INT1_VLC_1:
-      - template_VMInt_INT1_VLC_1
-      - binding
       network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:
       - template_VMInt_INT1_VLC_1
       - network.incoming.bytes.rate
+      binding_template_VMInt_INT1_VLC_1:
+      - template_VMInt_INT1_VLC_1
+      - binding
     requirements:
       dependency_template_VMInt_INT1_VLC_1:
       - template_VMInt_INT1_VLC_1
index c6562aa..14caefd 100644 (file)
@@ -101,12 +101,12 @@ topology_template:
       forwarder_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - forwarder\r
-      binding_template_VMInt_INT1_VLC_1:\r
-      - template_VMInt_INT1_VLC_1\r
-      - binding\r
       network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - network.incoming.bytes.rate\r
+      binding_template_VMInt_INT1_VLC_1:\r
+      - template_VMInt_INT1_VLC_1\r
+      - binding\r
     requirements:\r
       dependency_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
@@ -116,4 +116,4 @@ topology_template:
       - link\r
       binding_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
-      - binding\r
\ No newline at end of file
+      - binding\r
index 80763b5..ed33de5 100644 (file)
@@ -116,12 +116,12 @@ topology_template:
       forwarder_template_VMInt_INT1_VLC_1:
       - template_VMInt_INT1_VLC_1
       - forwarder
-      binding_template_VMInt_INT1_VLC_1:
-      - template_VMInt_INT1_VLC_1
-      - binding
       network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:
       - template_VMInt_INT1_VLC_1
       - network.incoming.bytes.rate
+      binding_template_VMInt_INT1_VLC_1:
+      - template_VMInt_INT1_VLC_1
+      - binding
       network.outgoing.bytes.rate_template_VMInt_INT2_VLC_1:
       - template_VMInt_INT2_VLC_1
       - network.outgoing.bytes.rate
index 1d9f79e..db38c6a 100644 (file)
@@ -102,12 +102,12 @@ topology_template:
       forwarder_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - forwarder\r
-      binding_template_VMInt_INT1_VLC_1:\r
-      - template_VMInt_INT1_VLC_1\r
-      - binding\r
       network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - network.incoming.bytes.rate\r
+      binding_template_VMInt_INT1_VLC_1:\r
+      - template_VMInt_INT1_VLC_1\r
+      - binding\r
     requirements:\r
       dependency_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
@@ -117,4 +117,4 @@ topology_template:
       - link\r
       binding_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
-      - binding\r
\ No newline at end of file
+      - binding\r
index 6ed1a54..6f99749 100644 (file)
@@ -98,12 +98,12 @@ topology_template:
       forwarder_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - forwarder\r
-      binding_template_VMInt_INT1_VLC_1:\r
-      - template_VMInt_INT1_VLC_1\r
-      - binding\r
       network.incoming.bytes.rate_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
       - network.incoming.bytes.rate\r
+      binding_template_VMInt_INT1_VLC_1:\r
+      - template_VMInt_INT1_VLC_1\r
+      - binding\r
     requirements:\r
       dependency_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
@@ -113,4 +113,4 @@ topology_template:
       - link\r
       binding_template_VMInt_INT1_VLC_1:\r
       - template_VMInt_INT1_VLC_1\r
-      - binding\r
\ No newline at end of file
+      - binding\r
index 088c5cb..b309238 100644 (file)
@@ -2319,6 +2319,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t2_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2326,12 +2332,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
@@ -2378,6 +2378,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t1_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2385,12 +2391,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       disk.ephemeral.size_1c2_catalog_instance:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 9995398..5b89bed 100644 (file)
@@ -233,12 +233,12 @@ topology_template:
       disk.write.bytes.rate_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.write.bytes.rate
-      binding_1c2_catalog_instance_1c2_t2_port:
-      - 1c2_catalog_instance_1c2_t2_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
       - 1c2_catalog_instance_1c2_t2_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t2_port:
+      - 1c2_catalog_instance_1c2_t2_port
+      - binding
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.packets
@@ -263,12 +263,12 @@ topology_template:
       disk.read.requests_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.read.requests
-      binding_1c2_catalog_instance_1c2_t1_port:
-      - 1c2_catalog_instance_1c2_t1_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t1_port:
+      - 1c2_catalog_instance_1c2_t1_port
+      - binding
       disk.ephemeral.size_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.ephemeral.size
index 9f74e79..c8969c3 100644 (file)
@@ -2305,6 +2305,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t2_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2312,12 +2318,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
@@ -2364,6 +2364,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t1_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2371,12 +2377,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       disk.ephemeral.size_1c2_catalog_instance:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index e761770..84648e4 100644 (file)
@@ -224,12 +224,12 @@ topology_template:
       disk.write.bytes.rate_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.write.bytes.rate
-      binding_1c2_catalog_instance_1c2_t2_port:
-      - 1c2_catalog_instance_1c2_t2_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
       - 1c2_catalog_instance_1c2_t2_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t2_port:
+      - 1c2_catalog_instance_1c2_t2_port
+      - binding
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.packets
@@ -254,12 +254,12 @@ topology_template:
       disk.read.requests_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.read.requests
-      binding_1c2_catalog_instance_1c2_t1_port:
-      - 1c2_catalog_instance_1c2_t1_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t1_port:
+      - 1c2_catalog_instance_1c2_t1_port
+      - binding
       disk.ephemeral.size_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.ephemeral.size
index 83341fa..7219866 100644 (file)
@@ -2305,6 +2305,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t2_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2312,12 +2318,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
@@ -2364,6 +2364,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_1c2_catalog_instance_1c2_t1_port:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -2371,12 +2377,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       disk.ephemeral.size_1c2_catalog_instance:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index e761770..84648e4 100644 (file)
@@ -224,12 +224,12 @@ topology_template:
       disk.write.bytes.rate_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.write.bytes.rate
-      binding_1c2_catalog_instance_1c2_t2_port:
-      - 1c2_catalog_instance_1c2_t2_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t2_port:
       - 1c2_catalog_instance_1c2_t2_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t2_port:
+      - 1c2_catalog_instance_1c2_t2_port
+      - binding
       network.incoming.packets_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.packets
@@ -254,12 +254,12 @@ topology_template:
       disk.read.requests_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.read.requests
-      binding_1c2_catalog_instance_1c2_t1_port:
-      - 1c2_catalog_instance_1c2_t1_port
-      - binding
       network.incoming.bytes.rate_1c2_catalog_instance_1c2_t1_port:
       - 1c2_catalog_instance_1c2_t1_port
       - network.incoming.bytes.rate
+      binding_1c2_catalog_instance_1c2_t1_port:
+      - 1c2_catalog_instance_1c2_t1_port
+      - binding
       disk.ephemeral.size_1c2_catalog_instance:
       - 1c2_catalog_instance
       - disk.ephemeral.size
index ae828c1..319a10b 100644 (file)
@@ -1126,6 +1126,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_pd_server_pattern4_port_1:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_pd_server_pattern4_port_1:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -1133,12 +1139,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_pd_server_pattern4_port_1:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       network.outgoing.packets.rate_pd_server_pattern4_port_1:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 1c8510a..55df63a 100644 (file)
@@ -380,12 +380,12 @@ topology_template:
       disk.iops_server_pd_pattern4_1:
       - server_pd_pattern4_1
       - disk.iops
-      binding_pd_server_pattern4_port_1:
-      - pd_server_pattern4_port_1
-      - binding
       network.incoming.bytes.rate_pd_server_pattern4_port_1:
       - pd_server_pattern4_port_1
       - network.incoming.bytes.rate
+      binding_pd_server_pattern4_port_1:
+      - pd_server_pattern4_port_1
+      - binding
       network.outgoing.packets.rate_pd_server_pattern4_port_1:
       - pd_server_pattern4_port_1
       - network.outgoing.packets.rate
index a014210..76b4b4c 100644 (file)
@@ -665,12 +665,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -678,6 +672,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 08d2568..25d58dc 100644 (file)
@@ -251,12 +251,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index bb22e72..45d6de5 100644 (file)
@@ -1014,6 +1014,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      network.incoming.bytes.rate_vson_server_oam_net_port_0:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       binding_vson_server_oam_net_port_0:
         type: tosca.capabilities.network.Bindable
         valid_source_types:
@@ -1021,12 +1027,6 @@ node_types:
         occurrences:
         - 0
         - UNBOUNDED
-      network.incoming.bytes.rate_vson_server_oam_net_port_0:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       disk.read.requests_vson_server:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 806a09a..cffb1be 100644 (file)
@@ -457,12 +457,12 @@ topology_template:
       host_vson_server:
       - vson_server
       - host
-      binding_vson_server_oam_net_port_0:
-      - vson_server_oam_net_port_0
-      - binding
       network.incoming.bytes.rate_vson_server_oam_net_port_0:
       - vson_server_oam_net_port_0
       - network.incoming.bytes.rate
+      binding_vson_server_oam_net_port_0:
+      - vson_server_oam_net_port_0
+      - binding
       disk.read.requests_vson_server:
       - vson_server
       - disk.read.requests
index 3aba31e..377175e 100644 (file)
@@ -127,12 +127,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -140,6 +134,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 2f147f2..ecfbd5f 100644 (file)
@@ -137,12 +137,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 3aba31e..377175e 100644 (file)
@@ -127,12 +127,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -140,6 +134,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 2f147f2..ecfbd5f 100644 (file)
@@ -137,12 +137,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 780b3f7..f22b830 100644 (file)
@@ -122,12 +122,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -135,6 +129,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 60e8339..8f6e5c3 100644 (file)
@@ -132,12 +132,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 1d33c5d..65dfbb4 100644 (file)
@@ -146,12 +146,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -159,6 +153,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 926d2d3..760664f 100644 (file)
@@ -173,12 +173,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 5d2cc3d..7636e73 100644 (file)
@@ -955,12 +955,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -968,6 +962,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 77aac1d..98d8e51 100644 (file)
@@ -136,12 +136,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 8658138..1192e31 100644 (file)
@@ -122,12 +122,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -135,6 +129,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index a55ef38..aaa6ef3 100644 (file)
@@ -132,12 +132,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 94df836..12f2859 100644 (file)
@@ -174,12 +174,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -187,6 +181,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 49ad66d..4ca4e70 100644 (file)
@@ -217,12 +217,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 6fdd7c7..836201f 100644 (file)
@@ -155,12 +155,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -168,6 +162,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 676521d..39438d0 100644 (file)
@@ -179,12 +179,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 4480823..f302b3f 100644 (file)
@@ -154,12 +154,6 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      disk.device.read.bytes.rate_server_cmaui:
-        type: org.openecomp.capabilities.metric.Ceilometer
-        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
-        occurrences:
-        - 1
-        - UNBOUNDED
       host_server_cmaui:
         type: tosca.capabilities.Container
         valid_source_types:
@@ -167,6 +161,12 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
+      disk.device.read.bytes.rate_server_cmaui:
+        type: org.openecomp.capabilities.metric.Ceilometer
+        description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
+        occurrences:
+        - 1
+        - UNBOUNDED
       cpu_util_server_cmaui:
         type: org.openecomp.capabilities.metric.Ceilometer
         description: A node type that includes the Metric capability indicates that it can be monitored using ceilometer.
index 6c8e9e9..30ce423 100644 (file)
@@ -178,12 +178,12 @@ topology_template:
       disk.write.bytes.rate_server_cmaui:
       - server_cmaui
       - disk.write.bytes.rate
-      disk.device.read.bytes.rate_server_cmaui:
-      - server_cmaui
-      - disk.device.read.bytes.rate
       host_server_cmaui:
       - server_cmaui
       - host
+      disk.device.read.bytes.rate_server_cmaui:
+      - server_cmaui
+      - disk.device.read.bytes.rate
       cpu_util_server_cmaui:
       - server_cmaui
       - cpu_util
index 0546cb6..8c748e2 100644 (file)
@@ -334,13 +334,13 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      attachment_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Attachment
+      feature_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Node
         occurrences:
         - 1
         - UNBOUNDED
-      feature_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Node
+      attachment_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Attachment
         occurrences:
         - 1
         - UNBOUNDED
index 3adeccc..e5ebd6a 100644 (file)
@@ -317,12 +317,12 @@ topology_template:
       network.outgoing.bytes_FSB1_FSB1_Internal:
       - FSB1_FSB1_Internal
       - network.outgoing.bytes
-      attachment_FSB1_FSB2_Internal:
-      - FSB1_FSB2_Internal
-      - attachment
       feature_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - feature
+      attachment_FSB1_FSB2_Internal:
+      - FSB1_FSB2_Internal
+      - attachment
       network.incoming.packets_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - network.incoming.packets
index c3a6a59..504c059 100644 (file)
@@ -282,13 +282,13 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      attachment_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Attachment
+      feature_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Node
         occurrences:
         - 1
         - UNBOUNDED
-      feature_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Node
+      attachment_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Attachment
         occurrences:
         - 1
         - UNBOUNDED
index 2047358..3509df1 100644 (file)
@@ -289,12 +289,12 @@ topology_template:
       network.outgoing.bytes_FSB1_FSB1_Internal:
       - FSB1_FSB1_Internal
       - network.outgoing.bytes
-      attachment_FSB1_FSB2_Internal:
-      - FSB1_FSB2_Internal
-      - attachment
       feature_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - feature
+      attachment_FSB1_FSB2_Internal:
+      - FSB1_FSB2_Internal
+      - attachment
       network.incoming.packets_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - network.incoming.packets
index e1dd79c..d197cd7 100644 (file)
@@ -358,13 +358,13 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      attachment_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Attachment
+      feature_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Node
         occurrences:
         - 1
         - UNBOUNDED
-      feature_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Node
+      attachment_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Attachment
         occurrences:
         - 1
         - UNBOUNDED
index a39d91f..c72dee5 100644 (file)
@@ -362,12 +362,12 @@ topology_template:
       network.outgoing.bytes_FSB1_FSB1_Internal:
       - FSB1_FSB1_Internal
       - network.outgoing.bytes
-      attachment_FSB1_FSB2_Internal:
-      - FSB1_FSB2_Internal
-      - attachment
       feature_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - feature
+      attachment_FSB1_FSB2_Internal:
+      - FSB1_FSB2_Internal
+      - attachment
       network.incoming.packets_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - network.incoming.packets
index ad95732..6e788ce 100644 (file)
@@ -276,13 +276,13 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      attachment_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Attachment
+      feature_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Node
         occurrences:
         - 1
         - UNBOUNDED
-      feature_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Node
+      attachment_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Attachment
         occurrences:
         - 1
         - UNBOUNDED
index 2f63c61..69b9998 100644 (file)
@@ -288,12 +288,12 @@ topology_template:
       network.outgoing.bytes_FSB1_FSB1_Internal:
       - FSB1_FSB1_Internal
       - network.outgoing.bytes
-      attachment_FSB1_FSB2_Internal:
-      - FSB1_FSB2_Internal
-      - attachment
       feature_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - feature
+      attachment_FSB1_FSB2_Internal:
+      - FSB1_FSB2_Internal
+      - attachment
       network.incoming.packets_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - network.incoming.packets
index d6f3279..8b3a094 100644 (file)
@@ -340,13 +340,13 @@ node_types:
         occurrences:
         - 1
         - UNBOUNDED
-      attachment_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Attachment
+      feature_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Node
         occurrences:
         - 1
         - UNBOUNDED
-      feature_FSB1_FSB2_Internal:
-        type: tosca.capabilities.Node
+      attachment_FSB1_FSB2_Internal:
+        type: tosca.capabilities.Attachment
         occurrences:
         - 1
         - UNBOUNDED
index 169b232..12cc87e 100644 (file)
@@ -342,12 +342,12 @@ topology_template:
       network.outgoing.bytes_FSB1_FSB1_Internal:
       - FSB1_FSB1_Internal
       - network.outgoing.bytes
-      attachment_FSB1_FSB2_Internal:
-      - FSB1_FSB2_Internal
-      - attachment
       feature_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - feature
+      attachment_FSB1_FSB2_Internal:
+      - FSB1_FSB2_Internal
+      - attachment
       network.incoming.packets_FSB1_FSB2_Internal:
       - FSB1_FSB2_Internal
       - network.incoming.packets
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/datatypes/ToscaInterfaceType.java
new file mode 100644 (file)
index 0000000..6a74f76
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * 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.
+ */
+
+package org.openecomp.sdc.tosca.datatypes;
+
+import org.openecomp.config.api.Configuration;
+import org.openecomp.config.api.ConfigurationManager;
+
+public class ToscaInterfaceType {
+
+  private static Configuration config = ConfigurationManager.lookup();
+
+  //TOSCA native types
+  public static final String NATIVE_ROOT = " tosca.interfaces.Root";
+  public static final String NATIVE_LIFECYCLE_STANDARD = "tosca.interfaces.node.lifecycle.Standard";
+
+
+}
index 1aa1719..5d4b7df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 European Support Limited
+ * Copyright © 2016-2018 European Support Limited
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,6 +44,7 @@ public class ToscaConstants {
   //General
   public static final String TOSCA_DEFINITIONS_VERSION = "tosca_simple_yaml_1_0_0";
   public static final String MODELABLE_ENTITY_NAME_SELF = "SELF";
+  public static final String MODELABLE_ENTITY_NAME_HOST = "HOST";
   public static final String NODE_TEMPLATE_DIRECTIVE_SUBSTITUTABLE = "substitutable";
   public static final String NATIVE_TYPES_SERVICE_TEMPLATE_NAME = "NativeTypesServiceTemplate";
   public static final String UNBOUNDED = "UNBOUNDED";
@@ -55,6 +56,7 @@ public class ToscaConstants {
   public static final String SUBSTITUTE_SERVICE_TEMPLATE_PROPERTY_NAME =
       "substitute_service_template";
   public static final String COUNT_PROPERTY_NAME = "count";
+  public static final String MANDATORY_PROPERTY_NAME = "mandatory";
   public static final String INDEX_VALUE_PROPERTY_NAME = "index_value";
   public static final String SCALING_ENABLED_PROPERTY_NAME = "scaling_enabled";
 
@@ -73,9 +75,10 @@ public class ToscaConstants {
   public static final String VF_MODULE_LABEL_PROPERTY_NAME = "vf_module_label";
   public static final String PARAM_NAME_PROPERTY_NAME = "param_name";
 
-  // propertiies valid values
+  // properties valid values
   public static final String HEAT_SOURCE_TYPE = "HEAT";
   public static final String GENERIC_SOURCE_TYPE = "Generic";
 
 
+
 }
index 6f514c0..411c50d 100644 (file)
@@ -27,6 +27,7 @@ import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
 import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
 import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
 import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
 import org.openecomp.sdc.tosca.datatypes.model.Import;
 import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
 import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
@@ -422,14 +423,20 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
       case NODE_TYPE:
         returnEntity = new NodeType();
         break;
+      case DATA_TYPE:
+        returnEntity = new DataType();
+        break;
       default:
         throw new RuntimeException(
             "Entity[" + elementType + "] id[" + typeId + "] flat not supported");
     }
 
-    scanAnFlatEntity(elementType, typeId, returnEntity, serviceTemplate, toscaModel,
-        new ArrayList<>(), 0);
-
+    boolean isEntityFound =
+        scanAnFlatEntity(elementType, typeId, returnEntity, serviceTemplate, toscaModel,
+            new ArrayList<>(), 0);
+    if (!isEntityFound) {
+      throw new CoreException(new ToscaElementTypeNotFoundErrorBuilder(typeId).build());
+    }
 
     return returnEntity;
   }
@@ -635,6 +642,12 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
           return false;
         }
         break;
+      case DATA_TYPE:
+        if (enrichDataTypeInfo(elementType, typeId, entity, serviceTemplate, toscaModel,
+            filesScanned, rootScanStartInx)) {
+          return false;
+        }
+        break;
       default:
         throw new RuntimeException(
             "Entity[" + elementType + "] id[" + typeId + "] flat not supported");
@@ -667,6 +680,28 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
     return false;
   }
 
+  private boolean enrichDataTypeInfo(ToscaElementTypes elementType, String typeId, Object entity,
+                                     ServiceTemplate serviceTemplate, ToscaServiceModel toscaModel,
+                                     List<String> filesScanned, int rootScanStartInx) {
+    String derivedFrom;
+    if (serviceTemplate.getData_types() != null
+        && serviceTemplate.getData_types().containsKey(typeId)) {
+
+      filesScanned.clear();
+      DataType targetDataType = (DataType) entity;
+      DataType sourceDataType = serviceTemplate.getData_types().get(typeId);
+      derivedFrom = sourceDataType.getDerived_from();
+      if (derivedFrom != null) {
+        scanAnFlatEntity(elementType, derivedFrom, entity, serviceTemplate, toscaModel,
+            filesScanned, rootScanStartInx);
+      }
+      combineDataTypeInfo(sourceDataType, targetDataType);
+    } else {
+      return true;
+    }
+    return false;
+  }
+
   private boolean enrichCapabilityType(ToscaElementTypes elementType, String typeId, Object entity,
                                        ServiceTemplate serviceTemplate,
                                        ToscaServiceModel toscaModel, List<String> filesScanned,
@@ -709,6 +744,16 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
 
   }
 
+  private void combineDataTypeInfo(DataType sourceDataType, DataType targetDataType) {
+    targetDataType.setDerived_from(sourceDataType.getDerived_from());
+    targetDataType.setDescription(sourceDataType.getDescription());
+    targetDataType.setVersion(sourceDataType.getVersion());
+    targetDataType.setProperties(
+        CommonMethods.mergeMaps(targetDataType.getProperties(), sourceDataType.getProperties()));
+    targetDataType.setConstraints(
+        CommonMethods.mergeLists(targetDataType.getConstraints(), sourceDataType.getConstraints()));
+  }
+
 
   private void combineCapabilityTypeInfo(CapabilityType sourceCapabilityType,
                                          CapabilityType targetCapabilityType) {
@@ -883,6 +928,4 @@ public class ToscaAnalyzerServiceImpl implements ToscaAnalyzerService {
       throw new RuntimeException(e);
     }
   }
-
-
 }
index 4e17e50..713e8d2 100644 (file)
@@ -34,6 +34,7 @@ import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
 import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
 import org.openecomp.sdc.tosca.datatypes.model.DataType;
 import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.openecomp.sdc.tosca.datatypes.model.DataType;
 import org.openecomp.sdc.tosca.datatypes.model.Import;
 import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
 import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
@@ -107,7 +108,26 @@ public class ToscaAnalyzerServiceImplTest {
   }
 
   @Test
-  public void testGetFlatEntity() throws Exception {
+  public void testGetFlatEntityNotFound() throws Exception {
+    thrown.expect(CoreException.class);
+    thrown.expectMessage(
+        "Entity Type 'org.openecomp.resource.vfc.notFound' or one of its derivedFrom type hierarchy, is not defined in tosca service model");
+    ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+    try (InputStream yamlFile = toscaExtensionYamlUtil
+        .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
+
+      ServiceTemplate
+          serviceTemplateFromYaml =
+          toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+      toscaAnalyzerService
+          .getFlatEntity(ToscaElementTypes.NODE_TYPE, "org.openecomp.resource.vfc.notFound",
+              serviceTemplateFromYaml, toscaServiceModel);
+    }
+  }
+
+  @Test
+  public void testGetFlatEntityNodeType() throws Exception {
     ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
     try (InputStream yamlFile = toscaExtensionYamlUtil
         .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
@@ -123,6 +143,39 @@ public class ToscaAnalyzerServiceImplTest {
       Assert.assertNotNull(flatEntity);
       Assert.assertEquals("org.openecomp.resource.vfc.nodes.heat.nova.Server", flatEntity
           .getDerived_from());
+      Assert.assertEquals(20, flatEntity.getProperties().size());
+      Assert.assertEquals("overridden default value",
+          flatEntity.getProperties().get("admin_pass").get_default());
+      Assert.assertEquals("REBUILD",
+          flatEntity.getProperties().get("image_update_policy").get_default());
+      Assert.assertNotNull(flatEntity.getProperties().get("new_property"));
+    }
+  }
+
+  @Test
+  public void testGetFlatEntityDataType() throws Exception {
+    ToscaExtensionYamlUtil toscaExtensionYamlUtil = new ToscaExtensionYamlUtil();
+    try (InputStream yamlFile = toscaExtensionYamlUtil
+        .loadYamlFileIs("/mock/analyzerService/NestedServiceTemplateReqTest.yaml")) {
+
+      ServiceTemplate
+          serviceTemplateFromYaml =
+          toscaExtensionYamlUtil.yamlToObject(yamlFile, ServiceTemplate.class);
+
+      final DataType flatEntity = (DataType) toscaAnalyzerService
+          .getFlatEntity(ToscaElementTypes.DATA_TYPE,
+              "org.openecomp.datatypes.heat.network.MyNewAddressPair", serviceTemplateFromYaml,
+              toscaServiceModel);
+
+      Assert.assertNotNull(flatEntity);
+      Assert.assertEquals("org.openecomp.datatypes.heat.network.MyAddressPair", flatEntity
+          .getDerived_from());
+      Assert.assertEquals(3, flatEntity.getProperties().size());
+      Assert.assertEquals("overridden default value",
+          flatEntity.getProperties().get("mac_address").get_default());
+      Assert.assertEquals(true,
+          flatEntity.getProperties().get("mac_address").getRequired());
+      Assert.assertNotNull(flatEntity.getProperties().get("new_property"));
     }
   }
 
index ce02d0c..8022d99 100644 (file)
@@ -25,6 +25,44 @@ imports:
 node_types:
   org.openecomp.resource.vfc.nodes.heat.cmaui_image:
     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+    properties:
+      admin_pass:
+        description: The administrator password for the server
+        type: string
+        status: SUPPORTED
+        default: overridden default value
+        required: false
+      new_property:
+        description: new property
+        type: string
+        status: SUPPORTED
+        required: false
+data_types:
+  org.openecomp.datatypes.heat.network.MyAddressPair:
+    derived_from: org.openecomp.datatypes.heat.network.AddressPair
+    description: My MAC/IP address pairs
+    properties:
+      mac_address:
+        description: MAC address
+        type: string
+        status: SUPPORTED
+        required: false
+        default: overridden default value
+      new_property:
+        description: new property
+        type: string
+        status: SUPPORTED
+        required: false
+  org.openecomp.datatypes.heat.network.MyNewAddressPair:
+    derived_from: org.openecomp.datatypes.heat.network.MyAddressPair
+    description: My new MAC/IP address pairs
+    properties:
+      mac_address:
+        description: MAC address
+        type: string
+        status: SUPPORTED
+        required: true
+        default: overridden default value
 topology_template:
   inputs:
     cmaui_names: