From f5f13c4f6b6fe3b4d98e349dfd7db59339803436 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 12:35:04 +0200 Subject: push addional code Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando --- .../GlobalSubstitutionTypesServiceTemplate.yaml | 236 +++++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 240 +++++++++ .../nested-pcm_v0.1ServiceTemplate.yaml | 207 ++++++++ .../nested-pcm_v0.1_2ServiceTemplate.yaml | 193 +++++++ .../mock/heat/nested/multi/inputs/MANIFEST.json | 30 ++ .../nested/multi/inputs/hot-nimbus-pcm_v0.4.env | 14 + .../nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml | 82 +++ .../nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml | 79 +++ .../heat/nested/multi/inputs/nested-pcm_v0.1.yaml | 114 +++++ .../nested/multi/inputs/nested-pcm_v0.1_2.yaml | 120 +++++ .../mock/heat/nested/multi/inputs/nimbus-ethernet | 0 .../GlobalSubstitutionTypesServiceTemplate.yaml | 166 ++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 240 +++++++++ .../mvs.nested.heatServiceTemplate.yaml | 320 ++++++++++++ .../multiple_resource_groups/inputs/MANIFEST.json | 19 + .../inputs/mvs.nested.heat.yaml | 165 ++++++ .../inputs/mvs.vfmodule.heat.yaml | 158 ++++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 267 ++++++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 241 +++++++++ .../nested2levelServiceTemplate.yaml | 175 +++++++ .../expectedoutputfiles/nestedServiceTemplate.yaml | 217 ++++++++ .../heat/nested/nested2levels/inputs/MANIFEST.json | 27 + .../heat/nested/nested2levels/inputs/addOn.yml | 26 + .../mock/heat/nested/nested2levels/inputs/base.yml | 58 +++ .../heat/nested/nested2levels/inputs/nested.yml | 65 +++ .../nested/nested2levels/inputs/nested2level.yml | 59 +++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 472 +++++++++++++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 241 +++++++++ .../nested2levelServiceTemplate.yaml | 217 ++++++++ .../nested3levelServiceTemplate.yaml | 175 +++++++ .../expectedoutputfiles/nestedServiceTemplate.yaml | 247 +++++++++ .../heat/nested/nested3levels/inputs/MANIFEST.json | 32 ++ .../heat/nested/nested3levels/inputs/addOn.yml | 26 + .../mock/heat/nested/nested3levels/inputs/base.yml | 58 +++ .../heat/nested/nested3levels/inputs/nested.yml | 65 +++ .../nested/nested3levels/inputs/nested2level.yml | 65 +++ .../nested/nested3levels/inputs/nested3level.yml | 59 +++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 79 +++ .../expectedoutputfiles/MainServiceTemplate.yaml | 65 +++ .../nested-pcm_v0.1ServiceTemplate.yaml | 91 ++++ .../nested/nestedvolumelocal/inputs/MANIFEST.json | 14 + .../inputs/hot-nimbus-pcm_v0.4.yaml | 22 + .../nestedvolumelocal/inputs/nested-pcm_v0.1.yaml | 29 ++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 79 +++ .../expectedoutputfiles/MainServiceTemplate.yaml | 72 +++ .../nested-pcm_v0.1ServiceTemplate.yaml | 91 ++++ .../nestedvolumeseperatefile/inputs/MANIFEST.json | 17 + .../inputs/hot-nimbus-pcm_v0.4.yaml | 23 + .../inputs/nested-pcm_v0.1.yaml | 31 ++ .../nestedvolumeseperatefile/inputs/volume.yaml | 14 + .../GlobalSubstitutionTypesServiceTemplate.yaml | 330 ++++++++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 240 +++++++++ .../nested-pcm_v0.1ServiceTemplate.yaml | 291 +++++++++++ .../nested-pcm_v0.1_2ServiceTemplate.yaml | 205 ++++++++ .../heat/nested/recursive/inputs/MANIFEST.json | 26 + .../recursive/inputs/hot-nimbus-pcm_v0.4.env | 14 + .../recursive/inputs/hot-nimbus-pcm_v0.4.yaml | 82 +++ .../recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml | 79 +++ .../nested/recursive/inputs/nested-pcm_v0.1.yaml | 138 +++++ .../nested/recursive/inputs/nested-pcm_v0.1_2.yaml | 110 ++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 161 ++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 569 +++++++++++++++++++++ .../mvs.nested.heatServiceTemplate.yaml | 254 +++++++++ .../resourceGroupIndexVar/inputs/MANIFEST.json | 19 + .../inputs/mvs.nested.heat.yaml | 129 +++++ .../inputs/mvs.vfmodule.heat.yaml | 228 +++++++++ .../resourceGroupInvalid/inputs/MANIFEST.json | 19 + .../inputs/mvs.nested.heat.yaml | 129 +++++ .../inputs/mvs.vfmodule.heat.yaml | 166 ++++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 153 ++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 246 +++++++++ .../dns_nested_01ServiceTemplate.yaml | 249 +++++++++ .../nested/resourceGroupMDNS/inputs/MANIFEST.json | 37 ++ .../nested/resourceGroupMDNS/inputs/base_dns.env | 8 + .../nested/resourceGroupMDNS/inputs/base_dns.yaml | 43 ++ .../nested/resourceGroupMDNS/inputs/dns_az_01.env | 21 + .../nested/resourceGroupMDNS/inputs/dns_az_01.yaml | 94 ++++ .../resourceGroupMDNS/inputs/dns_nested_01.yaml | 127 +++++ .../resourceGroupMDNS/inputs/nimbus-willows-2.pem | 27 + .../GlobalSubstitutionTypesServiceTemplate.yaml | 161 ++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 223 ++++++++ .../mvs.nested.heatServiceTemplate.yaml | 254 +++++++++ .../nested/resource_group/inputs/MANIFEST.json | 19 + .../resource_group/inputs/mvs.nested.heat.yaml | 129 +++++ .../resource_group/inputs/mvs.vfmodule.heat.yaml | 163 ++++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 166 ++++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 195 +++++++ .../mvs.nested.heatServiceTemplate.yaml | 320 ++++++++++++ .../inputs/MANIFEST.json | 19 + .../inputs/mvs.nested.heat.yaml | 165 ++++++ .../inputs/mvs.vfmodule.heat.yaml | 105 ++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 137 +++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 216 ++++++++ .../nested-pcm_v0.1ServiceTemplate.yaml | 207 ++++++++ .../reusenestedfrommultibase/inputs/MANIFEST.json | 23 + .../inputs/hot-nimbus-pcm_v0.4.env | 14 + .../inputs/hot-nimbus-pcm_v0.4.yaml | 82 +++ .../inputs/hot-nimbus-pcm_v0.4_2.yaml | 71 +++ .../inputs/nested-pcm_v0.1.yaml | 114 +++++ .../GlobalSubstitutionTypesServiceTemplate.yaml | 137 +++++ .../expectedoutputfiles/MainServiceTemplate.yaml | 236 +++++++++ .../nested-pcm_v0.1ServiceTemplate.yaml | 207 ++++++++ .../mock/heat/nested/single/inputs/MANIFEST.json | 20 + .../nested/single/inputs/hot-nimbus-pcm_v0.4.env | 14 + .../nested/single/inputs/hot-nimbus-pcm_v0.4.yaml | 94 ++++ .../heat/nested/single/inputs/nested-pcm_v0.1.yaml | 114 +++++ 106 files changed, 13601 insertions(+) create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested') diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..9e0e6efecd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,236 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + description: availabilityzone name + pcm_image_name: + type: string + description: PCRF CM image name + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + availabilityzone_name: + type: string + description: availabilityzone name + oam_net_gw: + type: string + description: CPS network gateway + pcm_image_name: + type: string + description: PCRF CM image name + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + description: OAM network ip + oam_net_mask: + type: string + description: CPS network mask + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..a0063b174e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,240 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + oam_net_ips: + label: OAM network ips + hidden: false + immutable: false + type: list + description: OAM network ips + entry_schema: + type: string + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_server_names: + label: PCRF CM server names + hidden: false + immutable: false + type: list + description: name of the PCRF CM instance + entry_schema: + type: string + pcm_image_name: + label: PCRF CM image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + cps_net_ips: + label: CPS network ips + hidden: false + immutable: false + type: list + description: CPS network ips + entry_schema: + type: string + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + pcm_volumes: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: list + description: CPS Cluman Cinder Volume + entry_schema: + type: string + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + server_pcm_002: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + pcm_flavor_name: + get_input: pcm_flavor_name + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_image_name: + get_input: pcm_image_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + pcm_server_name: + get_input: + - pcm_server_names + - 0 + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + oam_net_gw: + get_input: oam_net_gw + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + oam_net_ip: + get_input: + - oam_net_ips + - 0 + oam_net_mask: + get_input: oam_net_mask + oam_net_name: + get_input: oam_net_name + server_pcm_004: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + server_pcm_003: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + groups: + hot-nimbus-pcm_v0.4_2: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_004 + - server_pcm_003 + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_002 + - server_pcm_001 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..1b03021742 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,207 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + label: OAM network ip + hidden: false + immutable: false + type: string + description: OAM network ip + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - pcm_port_0 + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + os_server_pcm: + - server_pcm + - os + host_server_pcm: + - server_pcm + - host + scalable_server_pcm: + - server_pcm + - scalable + binding_server_pcm: + - server_pcm + - binding + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + local_storage_server_pcm: + - server_pcm + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml new file mode 100644 index 0000000000..34d0c6d899 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml @@ -0,0 +1,193 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1_2 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + hidden: false + immutable: false + type: string + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + groups: + nested-pcm_v0.1_2: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1_2.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - pcm_port_0 + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + os_server_pcm: + - server_pcm + - os + host_server_pcm: + - server_pcm + - host + scalable_server_pcm: + - server_pcm + - scalable + binding_server_pcm: + - server_pcm + - binding + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + local_storage_server_pcm: + - server_pcm + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json new file mode 100644 index 0000000000..b32b92ca11 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/MANIFEST.json @@ -0,0 +1,30 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.env", + "type": "HEAT_ENV" + } + ] + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + },{ + "file": "hot-nimbus-pcm_v0.4_2.yaml", + "type": "HEAT" + },{ + "file": "nested-pcm_v0.1_2.yaml", + "type": "HEAT" + }, + { + "file": "nimbus-ethernet", + "type": "OTHER" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env new file mode 100644 index 0000000000..78cc03e2ea --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.env @@ -0,0 +1,14 @@ +parameters: + pcm_server_names: ZRDM1PCRF01PCM001 + pcm_image_name: rhel2 + pcm_flavor_name: cps + availabilityzone_name: nova + cps_net_name: int_pcrf_net_0 + cps_net_ips: 172.26.16.113 + cps_net_mask: 255.255.255.0 + oam_net_name: oam_protected_net_0 + oam_net_ips: 107.239.64.121 + oam_net_gw: 107.239.64.1 + oam_net_mask: 255.255.255.0 + pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b + security_group_name: nimbus_security_group diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..f7d050790f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,82 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + oam_net_name: { get_param: oam_net_name } + oam_net_ip: { get_param: [oam_net_ips, 0] } + oam_net_mask: { get_param: oam_net_mask } + oam_net_gw: { get_param: oam_net_gw } + + server_pcm_002: + type: nested-pcm_v0.1.yaml + properties: + pcm_server_name: { get_param: [pcm_server_names, 0] } + pcm_image_name: { get_param: pcm_image_name } + pcm_flavor_name: { get_param: pcm_flavor_name } + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml new file mode 100644 index 0000000000..b59df84764 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/hot-nimbus-pcm_v0.4_2.yaml @@ -0,0 +1,79 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_003: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + + server_pcm_004: + type: nested-pcm_v0.1_2.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..109bf86d24 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,114 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string + label: OAM network ip + description: OAM network ip + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + network: + type: net + script_init: + type: OS:INIT + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS:: Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml new file mode 100644 index 0000000000..3f117a8410 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nested-pcm_v0.1_2.yaml @@ -0,0 +1,120 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string +resources: + network: + type: OS::Heat::CloudConfig + properties: + cloud_config: + write_files: + - path: /etc/sysconfig/network-scripts/ifcfg-eth0 + permissions: "0644" + content: + str_replace: + template: { get_file: "file:///nimbus-ethernet" } + params: + $dev: eth0 + $ip: { get_param: cps_net_ip } + $netmask: { get_param: cps_net_mask } + runcmd: + - ifdown eth0 && ifup eth0 + - ifdown eth1 && ifup eth1 + script_init: + type: OS::Heat::SoftwareConfig + properties: + group: ungrouped + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS:: Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multi/inputs/nimbus-ethernet new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..1b1c4dd621 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,166 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + indx: + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + type: string + description: Server flavor + constraints: [ + ] + key_name: + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + type: string + description: Unique ID for this VF instance + availability_zone_0: + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + type: string + description: Master bootimage volume id + sec_groups: + type: list + description: Security groups + entry_schema: + type: string + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + requirements: + - local_storage_vnfci: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_mgmt_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_vnfci: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_mgmt_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_vnfci: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_vnfci: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_vnfci: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_boot_volume: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + scalable_vnfci: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + attachment_data_volume: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..ffddcce43c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,240 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + num_instances: + hidden: false + immutable: false + type: float + description: number of instance of the VF_module + node_templates: + mvs_modules: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + get_input: vf_module_id + vf_name: + get_input: vf_name + cloud_zone_id: + get_input: cloud_zone_id + vf_instance_num: + get_input: vf_instance_num + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: + get_input: mvs_mgmt_ip_0 + flavor: + get_input: flavor + key_name: + get_input: key_name + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: + get_input: num_instances + mandatory: false + vnf_id: + get_input: vnf_id + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + get_input: vm_instance_num + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_input: vf_component + mvs_modules_same_nested_heat_file_no_count: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + get_input: vf_module_id + vf_name: + get_input: vf_name + cloud_zone_id: + get_input: cloud_zone_id + vf_instance_num: + get_input: vf_instance_num + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: + get_input: mvs_mgmt_ip_0 + flavor: + get_input: flavor + key_name: + get_input: key_name + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: 1 + mandatory: true + vnf_id: + get_input: vnf_id + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + get_input: vm_instance_num + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_input: vf_component + groups: + mvs.vfmodule.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.vfmodule.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - mvs_modules + - mvs_modules_same_nested_heat_file_no_count \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml new file mode 100644 index 0000000000..315318d4f6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml @@ -0,0 +1,320 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: mvs.nested.heat +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.vnfci: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + indx: + hidden: false + immutable: false + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + node_templates: + boot_volume: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + image: + get_input: bootimage + size: 35*1024 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + vnfci: + type: org.openecomp.resource.vfc.nodes.heat.vnfci + properties: + flavor: + get_input: flavor + key_name: + get_input: key_name + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + requirements: + - local_storage: + capability: tosca.capabilities.Attachment + node: boot_volume + relationship: tosca.relationships.AttachesTo + - local_storage: + capability: tosca.capabilities.Attachment + node: data_volume + relationship: tosca.relationships.AttachesTo + data_volume: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + size: 265*1024 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + mgmt_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: sec_groups + fixed_ips: + - ip_address: + Fn::Select: + - get_input: indx + - get_input: + - get_input: mvs_mgmt_ip_0 + allowed_address_pairs: + - ip_address: + get_input: virtual_mgmt_ip_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + network: + get_input: mgmt_net_id + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: vnfci + relationship: tosca.relationships.network.BindsTo + groups: + mvs.nested.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.nested.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - boot_volume + - vnfci + - data_volume + - mgmt_port + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + capabilities: + os_vnfci: + - vnfci + - os + attachment_mgmt_port: + - mgmt_port + - attachment + endpoint_vnfci: + - vnfci + - endpoint + host_vnfci: + - vnfci + - host + binding_vnfci: + - vnfci + - binding + attachment_boot_volume: + - boot_volume + - attachment + scalable_vnfci: + - vnfci + - scalable + attachment_data_volume: + - data_volume + - attachment + requirements: + local_storage_vnfci: + - vnfci + - local_storage + link_mgmt_port: + - mgmt_port + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json new file mode 100644 index 0000000000..c7729c8653 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "mvs.vfmodule.heat.yaml", + "description": "Metaswitch MVS (Metaview Server)", + "version": "2013-05-23", + "data": [ + { + "file": "mvs.vfmodule.heat.yaml", + "type": "HEAT", + "data": [ + ] + }, + { + "file": "mvs.nested.heat.yaml", + "type": "HEAT", + "data": [ + ] + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml new file mode 100644 index 0000000000..8ddc5c6488 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.nested.heat.yaml @@ -0,0 +1,165 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + indx: + type: number + description: Index of the current instance + +resources: + mgmt_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + network_id: { get_param: mgmt_net_id } + security_groups: [{ get_param: sec_groups }] + + fixed_ips: + - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] } + + allowed_address_pairs: + - ip_address: { get_param: virtual_mgmt_ip_0 } + + boot_volume: + type: OS::Cinder::Volume + properties: + size: 35 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + + image: { get_param: bootimage } + + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + + data_volume: + type: OS::Cinder::Volume + properties: + size: 265 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + + vnfci: + type: OS::Nova::Server + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + block_device_mapping: + - device_name: vda + volume_id: { get_resource: boot_volume } + delete_on_termination: false + - device_name: vdb + volume_id: { get_resource: data_volume } + delete_on_termination: false + flavor: { get_param: flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: mgmt_port } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml new file mode 100644 index 0000000000..55c98053a4 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/multiple_resource_groups/inputs/mvs.vfmodule.heat.yaml @@ -0,0 +1,158 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + num_instances: + type: number + description: number of instance of the VF_module + +resources: + mvs_modules: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + + availability_zone_0: { get_param: availability_zone_0 } + + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + + indx: "%index%" + mvs_modules_same_nested_heat_file_no_count: + type: OS::Heat::ResourceGroup + properties: + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + + availability_zone_0: { get_param: availability_zone_0 } + + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + + indx: "%index%" + shouldnt_get_translated: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: OS::Nova::Server + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + + availability_zone_0: { get_param: availability_zone_0 } + + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + + indx: "%index%" \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..e5cffd7233 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,267 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + type: string + description: UID of OAM network + cmaui_image: + type: string + description: Image for CMAUI server + cmaui_flavor: + type: string + description: Flavor for CMAUI server + availability_zone_0: + type: string + description: availabilityzone name + cmaui_oam_ips: + type: string + description: cmaui_port_1 + net: + type: string + description: UID of OAM network + shared_security_group_id1: + type: string + description: UID of OAM network + requirements: + - link_cmaui_port_2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_11_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_cmaui_test_nested2: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - local_storage_server_cmaui: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_cmaui_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_server_cmaui: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui_test_nested2: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui_test_nested2: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui_test_nested2: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui_test_nested2: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui_test_nested2: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + org.openecomp.resource.abstract.nodes.heat.nested2level: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + type: string + description: UID of OAM network + cmaui_image: + type: string + description: Image for CMAUI server + cmaui_flavor: + type: string + description: Flavor for CMAUI server + availability_zone_0: + type: string + description: availabilityzone name + cmaui_oam_ips: + type: string + description: cmaui_port_1 + net: + type: string + description: UID of OAM network + shared_security_group_id1: + type: string + description: UID of OAM network + requirements: + - link_cmaui_port_11: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_cmaui: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + host_server_cmaui: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..b619c99256 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,241 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + shared_security_group_id2: + hidden: false + immutable: false + type: string + description: network name of jsa log network + jsa_net_name: + hidden: false + immutable: false + type: string + description: network name of jsa log network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: network name of jsa log network + node_templates: + jsa_security_group1: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + get_input: security_group_name + description: ems security group + rules: + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: ingress + requirements: + - port: + capability: attachment_cmaui_port_2 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_cmaui_port_1 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + jsa_security_group2: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + get_input: security_group_name + description: ems security group + rules: + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: ingress + requirements: + - port: + capability: attachment_cmaui_port_1 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + test_nested: + type: org.openecomp.resource.abstract.nodes.heat.nested + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nestedServiceTemplate.yaml + p2: + get_input: shared_security_group_id2 + shared_security_group_id1: + get_input: shared_security_group_id1 + groups: + addOn: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/addOn.yml + description: | + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + members: + - test_nested + base: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base.yml + description: | + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + members: + - jsa_security_group1 + - jsa_security_group2 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml new file mode 100644 index 0000000000..e26b5c6c18 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nested2levelServiceTemplate.yaml @@ -0,0 +1,175 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested2level +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.cmaui: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + cmaui_oam_ips: + hidden: false + immutable: false + type: string + description: cmaui_port_1 + net: + hidden: false + immutable: false + type: string + description: UID of OAM network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: UID of OAM network + node_templates: + cmaui_port_11: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + - get_input: p2 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + cmaui_port_22: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + server_cmaui: + type: org.openecomp.resource.vfc.nodes.heat.cmaui + properties: + flavor: + get_input: cmaui_flavor + availability_zone: + get_input: availability_zone_0 + image: + get_input: cmaui_image + name: + get_input: + - cmaui_names + - 0 + groups: + nested2level: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested2level.yml + description: cmaui server template for vMMSC + members: + - cmaui_port_11 + - cmaui_port_22 + - server_cmaui + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested2level + capabilities: + host_server_cmaui: + - server_cmaui + - host + os_server_cmaui: + - server_cmaui + - os + attachment_cmaui_port_11: + - cmaui_port_11 + - attachment + attachment_cmaui_port_22: + - cmaui_port_22 + - attachment + endpoint_server_cmaui: + - server_cmaui + - endpoint + binding_server_cmaui: + - server_cmaui + - binding + scalable_server_cmaui: + - server_cmaui + - scalable + requirements: + local_storage_server_cmaui: + - server_cmaui + - local_storage + link_cmaui_port_11: + - cmaui_port_11 + - link + link_cmaui_port_22: + - cmaui_port_22 + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml new file mode 100644 index 0000000000..8001ba9d7d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/expectedoutputfiles/nestedServiceTemplate.yaml @@ -0,0 +1,217 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.cmaui: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + cmaui_oam_ips: + hidden: false + immutable: false + type: string + description: cmaui_port_1 + net: + hidden: false + immutable: false + type: string + description: UID of OAM network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: UID of OAM network + node_templates: + cmaui_port_2: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + test_nested2: + type: org.openecomp.resource.abstract.nodes.heat.nested2level + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested2levelServiceTemplate.yaml + p2: + get_input: p2 + shared_security_group_id1: + get_input: shared_security_group_id1 + server_cmaui: + type: org.openecomp.resource.vfc.nodes.heat.cmaui + properties: + flavor: + get_input: cmaui_flavor + availability_zone: + get_input: availability_zone_0 + image: + get_input: cmaui_image + name: + get_input: + - cmaui_names + - 0 + cmaui_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + - get_input: p2 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + groups: + nested: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested.yml + description: cmaui server template for vMMSC + members: + - cmaui_port_2 + - test_nested2 + - server_cmaui + - cmaui_port_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested + capabilities: + os_server_cmaui: + - server_cmaui + - os + scalable_server_cmaui: + - server_cmaui + - scalable + host_server_cmaui: + - server_cmaui + - host + endpoint_server_cmaui: + - server_cmaui + - endpoint + attachment_cmaui_port_11_test_nested2: + - test_nested2 + - attachment_cmaui_port_11 + binding_server_cmaui: + - server_cmaui + - binding + attachment_cmaui_port_2: + - cmaui_port_2 + - attachment + endpoint_server_cmaui_test_nested2: + - test_nested2 + - endpoint_server_cmaui + host_server_cmaui_test_nested2: + - test_nested2 + - host_server_cmaui + binding_server_cmaui_test_nested2: + - test_nested2 + - binding_server_cmaui + scalable_server_cmaui_test_nested2: + - test_nested2 + - scalable_server_cmaui + os_server_cmaui_test_nested2: + - test_nested2 + - os_server_cmaui + attachment_cmaui_port_22_test_nested2: + - test_nested2 + - attachment_cmaui_port_22 + attachment_cmaui_port_1: + - cmaui_port_1 + - attachment + requirements: + local_storage_server_cmaui_test_nested2: + - test_nested2 + - local_storage_server_cmaui + local_storage_server_cmaui: + - server_cmaui + - local_storage + link_cmaui_port_22_test_nested2: + - test_nested2 + - link_cmaui_port_22 + link_cmaui_port_2: + - cmaui_port_2 + - link + link_cmaui_port_11_test_nested2: + - test_nested2 + - link_cmaui_port_11 + link_cmaui_port_1: + - cmaui_port_1 + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json new file mode 100644 index 0000000000..992097af43 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/MANIFEST.json @@ -0,0 +1,27 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "base.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "nested2level.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "addOn.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml new file mode 100644 index 0000000000..0e7619a478 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/addOn.yml @@ -0,0 +1,26 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + shared_security_group_id1: + type: string + description: network name of jsa log network + shared_security_group_id2: + type: string + description: network name of jsa log network + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + test_nested: + type: nested.yml + properties: + shared_security_group_id1: { get_param: shared_security_group_id1} + p2: { get_param: shared_security_group_id2} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml new file mode 100644 index 0000000000..9167ffbafd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/base.yml @@ -0,0 +1,58 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + jsa_security_group1: + type: OS::Neutron::SecurityGroup + properties: + description: ems security group + name: {get_param: security_group_name} + rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"} + ] + + jsa_security_group2: + type: OS::Neutron::SecurityGroup + properties: + description: ems security group + name: {get_param: security_group_name} + rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"} + ] +outputs: + shared_security_group_id1: + value: {get_resource: jsa_security_group1} + + shared_security_group_id2: + value: {get_resource: jsa_security_group2} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml new file mode 100644 index 0000000000..b202fef7b0 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested.yml @@ -0,0 +1,65 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + shared_security_group_id1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + net: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + description: cmaui_port_1 + +resources: + + cmaui_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}] + replacement_policy: AUTO + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}] + replacement_policy: AUTO + + server_cmaui: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: cmaui_port_1 } + - port: { get_resource: cmaui_port_2 } + + test_nested2: + type: nested2level.yml + properties: + shared_security_group_id1: { get_param: shared_security_group_id1} + p2: { get_param: p2} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml new file mode 100644 index 0000000000..6a123d1641 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested2levels/inputs/nested2level.yml @@ -0,0 +1,59 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + shared_security_group_id1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + net: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + description: cmaui_port_1 + +resources: + + cmaui_port_11: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}] + replacement_policy: AUTO + + cmaui_port_22: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}] + replacement_policy: AUTO + + server_cmaui: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: cmaui_port_11 } + - port: { get_resource: cmaui_port_22 } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..9aaa8caf18 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,472 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + type: string + description: UID of OAM network + cmaui_image: + type: string + description: Image for CMAUI server + cmaui_flavor: + type: string + description: Flavor for CMAUI server + availability_zone_0: + type: string + description: availabilityzone name + cmaui_oam_ips: + type: string + description: cmaui_port_1 + net: + type: string + description: UID of OAM network + shared_security_group_id1: + type: string + description: UID of OAM network + requirements: + - link_cmaui_port_2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_11_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_11_test_nested3_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22_test_nested3_test_nested2: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_cmaui_test_nested3_test_nested2: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - local_storage_server_cmaui_test_nested2: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - local_storage_server_cmaui: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_cmaui_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_server_cmaui: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui_test_nested3_test_nested2: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui_test_nested3_test_nested2: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui_test_nested3_test_nested2: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22_test_nested3_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11_test_nested3_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui_test_nested2: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui_test_nested3_test_nested2: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui_test_nested2: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui_test_nested2: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui_test_nested2: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui_test_nested2: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22_test_nested2: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui_test_nested3_test_nested2: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + org.openecomp.resource.abstract.nodes.heat.nested3level: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + type: string + description: UID of OAM network + cmaui_image: + type: string + description: Image for CMAUI server + cmaui_flavor: + type: string + description: Flavor for CMAUI server + availability_zone_0: + type: string + description: availabilityzone name + cmaui_oam_ips: + type: string + description: cmaui_port_1 + net: + type: string + description: UID of OAM network + shared_security_group_id1: + type: string + description: UID of OAM network + requirements: + - link_cmaui_port_11: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_cmaui: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + host_server_cmaui: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + org.openecomp.resource.abstract.nodes.heat.nested2level: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + cmaui_names: + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + type: string + description: UID of OAM network + cmaui_image: + type: string + description: Image for CMAUI server + cmaui_flavor: + type: string + description: Flavor for CMAUI server + availability_zone_0: + type: string + description: availabilityzone name + cmaui_oam_ips: + type: string + description: cmaui_port_1 + net: + type: string + description: UID of OAM network + shared_security_group_id1: + type: string + description: UID of OAM network + requirements: + - link_cmaui_port_11: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_11_test_nested3: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_cmaui_port_22_test_nested3: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_cmaui_test_nested3: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - local_storage_server_cmaui: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + os_server_cmaui: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22_test_nested3: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11_test_nested3: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_11: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_cmaui_port_22: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + host_server_cmaui_test_nested3: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + endpoint_server_cmaui_test_nested3: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_server_cmaui_test_nested3: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + binding_server_cmaui_test_nested3: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_server_cmaui_test_nested3: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..b619c99256 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,241 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + shared_security_group_id2: + hidden: false + immutable: false + type: string + description: network name of jsa log network + jsa_net_name: + hidden: false + immutable: false + type: string + description: network name of jsa log network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: network name of jsa log network + node_templates: + jsa_security_group1: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + get_input: security_group_name + description: ems security group + rules: + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: ingress + requirements: + - port: + capability: attachment_cmaui_port_2 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_cmaui_port_1 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + jsa_security_group2: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + get_input: security_group_name + description: ems security group + rules: + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + - protocol: tcp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv6 + port_range_max: 65535 + remote_ip_prefix: ::/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv6 + remote_ip_prefix: ::/0 + direction: ingress + requirements: + - port: + capability: attachment_cmaui_port_1 + node: test_nested + relationship: org.openecomp.relationships.AttachesTo + test_nested: + type: org.openecomp.resource.abstract.nodes.heat.nested + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nestedServiceTemplate.yaml + p2: + get_input: shared_security_group_id2 + shared_security_group_id1: + get_input: shared_security_group_id1 + groups: + addOn: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/addOn.yml + description: | + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + members: + - test_nested + base: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base.yml + description: | + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + members: + - jsa_security_group1 + - jsa_security_group2 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml new file mode 100644 index 0000000000..2c64802a2b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested2levelServiceTemplate.yaml @@ -0,0 +1,217 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested2level +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.cmaui: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + cmaui_oam_ips: + hidden: false + immutable: false + type: string + description: cmaui_port_1 + net: + hidden: false + immutable: false + type: string + description: UID of OAM network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: UID of OAM network + node_templates: + cmaui_port_11: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + - get_input: p2 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + cmaui_port_22: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + test_nested3: + type: org.openecomp.resource.abstract.nodes.heat.nested3level + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested3levelServiceTemplate.yaml + p2: + get_input: p2 + shared_security_group_id1: + get_input: shared_security_group_id1 + server_cmaui: + type: org.openecomp.resource.vfc.nodes.heat.cmaui + properties: + flavor: + get_input: cmaui_flavor + availability_zone: + get_input: availability_zone_0 + image: + get_input: cmaui_image + name: + get_input: + - cmaui_names + - 0 + groups: + nested2level: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested2level.yml + description: cmaui server template for vMMSC + members: + - cmaui_port_11 + - cmaui_port_22 + - test_nested3 + - server_cmaui + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested2level + capabilities: + os_server_cmaui: + - server_cmaui + - os + attachment_cmaui_port_22_test_nested3: + - test_nested3 + - attachment_cmaui_port_22 + attachment_cmaui_port_11_test_nested3: + - test_nested3 + - attachment_cmaui_port_11 + scalable_server_cmaui: + - server_cmaui + - scalable + host_server_cmaui: + - server_cmaui + - host + attachment_cmaui_port_11: + - cmaui_port_11 + - attachment + attachment_cmaui_port_22: + - cmaui_port_22 + - attachment + host_server_cmaui_test_nested3: + - test_nested3 + - host_server_cmaui + endpoint_server_cmaui: + - server_cmaui + - endpoint + binding_server_cmaui: + - server_cmaui + - binding + endpoint_server_cmaui_test_nested3: + - test_nested3 + - endpoint_server_cmaui + os_server_cmaui_test_nested3: + - test_nested3 + - os_server_cmaui + binding_server_cmaui_test_nested3: + - test_nested3 + - binding_server_cmaui + scalable_server_cmaui_test_nested3: + - test_nested3 + - scalable_server_cmaui + requirements: + local_storage_server_cmaui_test_nested3: + - test_nested3 + - local_storage_server_cmaui + local_storage_server_cmaui: + - server_cmaui + - local_storage + link_cmaui_port_11: + - cmaui_port_11 + - link + link_cmaui_port_22: + - cmaui_port_22 + - link + link_cmaui_port_22_test_nested3: + - test_nested3 + - link_cmaui_port_22 + link_cmaui_port_11_test_nested3: + - test_nested3 + - link_cmaui_port_11 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml new file mode 100644 index 0000000000..d270626fa7 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nested3levelServiceTemplate.yaml @@ -0,0 +1,175 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested3level +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.cmaui: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + cmaui_oam_ips: + hidden: false + immutable: false + type: string + description: cmaui_port_1 + net: + hidden: false + immutable: false + type: string + description: UID of OAM network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: UID of OAM network + node_templates: + cmaui_port_11: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + - get_input: p2 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + cmaui_port_22: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + server_cmaui: + type: org.openecomp.resource.vfc.nodes.heat.cmaui + properties: + flavor: + get_input: cmaui_flavor + availability_zone: + get_input: availability_zone_0 + image: + get_input: cmaui_image + name: + get_input: + - cmaui_names + - 0 + groups: + nested3level: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested3level.yml + description: cmaui server template for vMMSC + members: + - cmaui_port_11 + - cmaui_port_22 + - server_cmaui + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested3level + capabilities: + host_server_cmaui: + - server_cmaui + - host + os_server_cmaui: + - server_cmaui + - os + attachment_cmaui_port_11: + - cmaui_port_11 + - attachment + attachment_cmaui_port_22: + - cmaui_port_22 + - attachment + endpoint_server_cmaui: + - server_cmaui + - endpoint + binding_server_cmaui: + - server_cmaui + - binding + scalable_server_cmaui: + - server_cmaui + - scalable + requirements: + local_storage_server_cmaui: + - server_cmaui + - local_storage + link_cmaui_port_11: + - cmaui_port_11 + - link + link_cmaui_port_22: + - cmaui_port_22 + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml new file mode 100644 index 0000000000..d78a252f4f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/expectedoutputfiles/nestedServiceTemplate.yaml @@ -0,0 +1,247 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.cmaui: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + cmaui_names: + hidden: false + immutable: false + type: list + description: CMAUI1, CMAUI2 server names + entry_schema: + type: string + p2: + hidden: false + immutable: false + type: string + description: UID of OAM network + cmaui_image: + hidden: false + immutable: false + type: string + description: Image for CMAUI server + cmaui_flavor: + hidden: false + immutable: false + type: string + description: Flavor for CMAUI server + availability_zone_0: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + cmaui_oam_ips: + hidden: false + immutable: false + type: string + description: cmaui_port_1 + net: + hidden: false + immutable: false + type: string + description: UID of OAM network + shared_security_group_id1: + hidden: false + immutable: false + type: string + description: UID of OAM network + node_templates: + cmaui_port_2: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + test_nested2: + type: org.openecomp.resource.abstract.nodes.heat.nested2level + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested2levelServiceTemplate.yaml + p2: + get_input: p2 + shared_security_group_id1: + get_input: shared_security_group_id1 + server_cmaui: + type: org.openecomp.resource.vfc.nodes.heat.cmaui + properties: + flavor: + get_input: cmaui_flavor + availability_zone: + get_input: availability_zone_0 + image: + get_input: cmaui_image + name: + get_input: + - cmaui_names + - 0 + cmaui_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + replacement_policy: AUTO + security_groups: + - get_input: shared_security_group_id1 + - get_input: p2 + fixed_ips: + - ip_address: + get_input: + - cmaui_oam_ips + - 0 + network: + get_input: net + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_cmaui + relationship: tosca.relationships.network.BindsTo + groups: + nested: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested.yml + description: cmaui server template for vMMSC + members: + - cmaui_port_2 + - test_nested2 + - server_cmaui + - cmaui_port_1 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested + capabilities: + os_server_cmaui: + - server_cmaui + - os + binding_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - binding_server_cmaui_test_nested3 + scalable_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - scalable_server_cmaui_test_nested3 + host_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - host_server_cmaui_test_nested3 + scalable_server_cmaui: + - server_cmaui + - scalable + attachment_cmaui_port_22_test_nested3_test_nested2: + - test_nested2 + - attachment_cmaui_port_22_test_nested3 + host_server_cmaui: + - server_cmaui + - host + attachment_cmaui_port_11_test_nested3_test_nested2: + - test_nested2 + - attachment_cmaui_port_11_test_nested3 + endpoint_server_cmaui: + - server_cmaui + - endpoint + attachment_cmaui_port_11_test_nested2: + - test_nested2 + - attachment_cmaui_port_11 + binding_server_cmaui: + - server_cmaui + - binding + attachment_cmaui_port_2: + - cmaui_port_2 + - attachment + endpoint_server_cmaui_test_nested2: + - test_nested2 + - endpoint_server_cmaui + endpoint_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - endpoint_server_cmaui_test_nested3 + scalable_server_cmaui_test_nested2: + - test_nested2 + - scalable_server_cmaui + host_server_cmaui_test_nested2: + - test_nested2 + - host_server_cmaui + binding_server_cmaui_test_nested2: + - test_nested2 + - binding_server_cmaui + os_server_cmaui_test_nested2: + - test_nested2 + - os_server_cmaui + attachment_cmaui_port_22_test_nested2: + - test_nested2 + - attachment_cmaui_port_22 + os_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - os_server_cmaui_test_nested3 + attachment_cmaui_port_1: + - cmaui_port_1 + - attachment + requirements: + local_storage_server_cmaui_test_nested2: + - test_nested2 + - local_storage_server_cmaui + local_storage_server_cmaui: + - server_cmaui + - local_storage + link_cmaui_port_11_test_nested3_test_nested2: + - test_nested2 + - link_cmaui_port_11_test_nested3 + link_cmaui_port_22_test_nested2: + - test_nested2 + - link_cmaui_port_22 + link_cmaui_port_22_test_nested3_test_nested2: + - test_nested2 + - link_cmaui_port_22_test_nested3 + local_storage_server_cmaui_test_nested3_test_nested2: + - test_nested2 + - local_storage_server_cmaui_test_nested3 + link_cmaui_port_2: + - cmaui_port_2 + - link + link_cmaui_port_11_test_nested2: + - test_nested2 + - link_cmaui_port_11 + link_cmaui_port_1: + - cmaui_port_1 + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json new file mode 100644 index 0000000000..ea06fcc95a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/MANIFEST.json @@ -0,0 +1,32 @@ +{ + "name": "vMME_Small", + "description": "HOT template to create 2 cinder volume attachment", + "version": "2013-05-23", + "data": [ + { + "file": "base.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "nested.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "nested2level.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "nested3level.yml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "addOn.yml", + "type": "HEAT", + "isBase": "false" + } + ] +} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml new file mode 100644 index 0000000000..0e7619a478 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/addOn.yml @@ -0,0 +1,26 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + shared_security_group_id1: + type: string + description: network name of jsa log network + shared_security_group_id2: + type: string + description: network name of jsa log network + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + test_nested: + type: nested.yml + properties: + shared_security_group_id1: { get_param: shared_security_group_id1} + p2: { get_param: shared_security_group_id2} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml new file mode 100644 index 0000000000..9167ffbafd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/base.yml @@ -0,0 +1,58 @@ +heat_template_version: 2013-05-23 + +description: > + Version 2.0 02-09-2016 (Authors: John Doe, user PROD) + +parameters: + jsa_net_name: + type: string + description: network name of jsa log network + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + jsa_security_group1: + type: OS::Neutron::SecurityGroup + properties: + description: ems security group + name: {get_param: security_group_name} + rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"} + ] + + jsa_security_group2: + type: OS::Neutron::SecurityGroup + properties: + description: ems security group + name: {get_param: security_group_name} + rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": egress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": "::/0"}, + {"direction": ingress, "ethertype": IPv6, "protocol": icmp, "remote_ip_prefix": "::/0"} + ] +outputs: + shared_security_group_id1: + value: {get_resource: jsa_security_group1} + + shared_security_group_id2: + value: {get_resource: jsa_security_group2} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml new file mode 100644 index 0000000000..b202fef7b0 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested.yml @@ -0,0 +1,65 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + shared_security_group_id1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + net: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + description: cmaui_port_1 + +resources: + + cmaui_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}] + replacement_policy: AUTO + + cmaui_port_2: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}] + replacement_policy: AUTO + + server_cmaui: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: cmaui_port_1 } + - port: { get_resource: cmaui_port_2 } + + test_nested2: + type: nested2level.yml + properties: + shared_security_group_id1: { get_param: shared_security_group_id1} + p2: { get_param: p2} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml new file mode 100644 index 0000000000..14c137a884 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested2level.yml @@ -0,0 +1,65 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + shared_security_group_id1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + net: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + description: cmaui_port_1 + +resources: + + cmaui_port_11: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}] + replacement_policy: AUTO + + cmaui_port_22: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}] + replacement_policy: AUTO + + server_cmaui: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: cmaui_port_11 } + - port: { get_resource: cmaui_port_22 } + + test_nested3: + type: nested3level.yml + properties: + shared_security_group_id1: { get_param: shared_security_group_id1} + p2: { get_param: p2} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml new file mode 100644 index 0000000000..6a123d1641 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nested3levels/inputs/nested3level.yml @@ -0,0 +1,59 @@ +heat_template_version: 2013-05-23 + +description: cmaui server template for vMMSC + +parameters: + shared_security_group_id1: + type: string + description: UID of OAM network + p2: + type: string + description: UID of OAM network + net: + type: string + description: UID of OAM network + cmaui_names: + type: comma_delimited_list + description: CMAUI1, CMAUI2 server names + cmaui_image: + type: string + description: Image for CMAUI server + availability_zone_0: + type: string + label: availabilityzone name + description: availabilityzone name + cmaui_flavor: + type: string + description: Flavor for CMAUI server + cmaui_oam_ips: + type: string + description: cmaui_port_1 + +resources: + + cmaui_port_11: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}, {get_param: p2}] + replacement_policy: AUTO + + cmaui_port_22: + type: OS::Neutron::Port + properties: + network: { get_param: net } + fixed_ips: [{"ip_address": {get_param: [cmaui_oam_ips, 0]}}] + security_groups: [{get_param: shared_security_group_id1}] + replacement_policy: AUTO + + server_cmaui: + type: OS::Nova::Server + properties: + name: { get_param: [cmaui_names, 0]} + image: { get_param: cmaui_image } + availability_zone: { get_param: availability_zone_0 } + flavor: { get_param: cmaui_flavor } + networks: + - port: { get_resource: cmaui_port_11 } + - port: { get_resource: cmaui_port_22 } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..ef081a9bec --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,79 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + nova_image_name: + type: string + description: PCRF CM server name + pcm_server_name: + type: string + description: PCRF CM server name + nove_001_vol_property: + type: string + description: PCRF CM server name + requirements: + - local_storage_nova_001: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + scalable_nova_001: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_nova_001: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + endpoint_nova_001: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_nova_001: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + binding_nova_001: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..136eb6309a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,65 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + not_null: + hidden: false + immutable: false + type: string + node_templates: + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + nove_001_vol_property: nove_001_vol + requirements: + - local_storage_nova_001: + capability: tosca.capabilities.Attachment + node: nove_001_vol + relationship: tosca.relationships.AttachesTo + nove_001_vol: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: { + } + groups: + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_001 + - nove_001_vol \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..1b9c34f1da --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,91 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.nova: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + nova_image_name: + label: nova_001 image name + hidden: false + immutable: false + type: string + description: PCRF CM server name + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + nove_001_vol_property: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + node_templates: + nova_001: + type: org.openecomp.resource.vfc.nodes.heat.nova + properties: + image: + get_input: nova_image_name + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - nova_001 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + scalable_nova_001: + - nova_001 + - scalable + host_nova_001: + - nova_001 + - host + endpoint_nova_001: + - nova_001 + - endpoint + os_nova_001: + - nova_001 + - os + binding_nova_001: + - nova_001 + - binding + requirements: + local_storage_nova_001: + - nova_001 + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json new file mode 100644 index 0000000000..44c5652ed6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/MANIFEST.json @@ -0,0 +1,14 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT" + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..93dd4470b8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,22 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + not_null: + type: string + + + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + nove_001_vol_property: { get_resource: nove_001_vol } + + nove_001_vol: + type: OS::Cinder::Volume + properties: + not_null: not_null + + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..d444a691ff --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumelocal/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,29 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + nove_001_vol_property: + type: string + label: PCRF CM server name + description: PCRF CM server name + nova_image_name: + type: string + label: nova_001 image name + description: PCRF CM server name + +resources: + nova_001: + type: OS::Nova::Server + properties: + not_null: not_null + image: {get_param: nova_image_name} + nove_001_vol_attach: + type: OS::Cinder::VolumeAttachment + properties: + volume_id: {get_param: nove_001_vol_property} + instance_uuid: {get_resource: nova_001} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..5edf602a57 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,79 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + nova_image_name: + type: string + description: nova image name + pcm_server_name: + type: string + description: PCRF CM server name + nove_001_vol_property: + type: string + description: volume name + requirements: + - local_storage_nova_001: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + scalable_nova_001: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + host_nova_001: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + endpoint_nova_001: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_nova_001: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + binding_nova_001: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..30e792209b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,72 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + not_null: + hidden: false + immutable: false + type: string + nove_001_vol: + label: volume + hidden: false + immutable: false + type: string + description: volume name + node_templates: + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + nove_001_vol_property: + get_input: nove_001_vol + nove_001_vol: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: { + } + groups: + volume: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/volume.yaml + members: + - nove_001_vol + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_001 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..3f03905588 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,91 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.nova: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + nova_image_name: + label: volume + hidden: false + immutable: false + type: string + description: nova image name + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + nove_001_vol_property: + label: volume + hidden: false + immutable: false + type: string + description: volume name + node_templates: + nova_001: + type: org.openecomp.resource.vfc.nodes.heat.nova + properties: + image: + get_input: nova_image_name + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - nova_001 + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + scalable_nova_001: + - nova_001 + - scalable + host_nova_001: + - nova_001 + - host + endpoint_nova_001: + - nova_001 + - endpoint + os_nova_001: + - nova_001 + - os + binding_nova_001: + - nova_001 + - binding + requirements: + local_storage_nova_001: + - nova_001 + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json new file mode 100644 index 0000000000..63b14401c8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT" + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + },{ + "file": "volume.yaml", + "type": "HEAT_VOL" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..f6cfa047ef --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,23 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + not_null: + type: string + + nove_001_vol: + type: string + label: volume + description: volume name + + + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + nove_001_vol_property: { get_param: nove_001_vol } + + + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..b8ab56319a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,31 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + + nove_001_vol_property: + type: string + label: volume + description: volume name + + nova_image_name: + type: string + label: volume + description: nova image name + +resources: + nova_001: + type: OS::Nova::Server + properties: + not_null: not_null + image: {get_param: nova_image_name} + nove_001_vol_attach: + type: OS::Cinder::VolumeAttachment + properties: + volume_id: {get_param: nove_001_vol_property} + instance_uuid: {get_resource: nova_001} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml new file mode 100644 index 0000000000..dbb3859b37 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/nestedvolumeseperatefile/inputs/volume.yaml @@ -0,0 +1,14 @@ +heat_template_version: 2013-05-23 + +parameters: + not_null: + type: number + label: not_number + + +resources: + nove_001_vol: + type: OS::Cinder::Volume + properties: + not_null: not_null + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..2dee4a9971 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,330 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + description: availabilityzone name + pcm_image_name: + type: string + description: PCRF CM image name + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + link_network: + type: tosca.capabilities.network.Linkable + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + attachment_network: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + availabilityzone_name: + type: string + description: availabilityzone name + oam_net_gw: + type: string + description: CPS network gateway + pcm_image_name: + type: string + description: PCRF CM image name + cps_net_ips: + type: string + description: CPS network ip + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_volumes: + type: string + description: CPS Cluman Cinder Volume + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + description: OAM network ip + oam_net_mask: + type: string + description: CPS network mask + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_1_server_pcm_005: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm_server_pcm_005: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0_server_pcm_005: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + host_server_pcm_server_pcm_005: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + os_server_pcm_server_pcm_005: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm_server_pcm_005: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm_server_pcm_005: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + endpoint_server_pcm_server_pcm_005: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + attachment_network_server_pcm_005: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_network: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + link_network: + type: tosca.capabilities.network.Linkable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0_server_pcm_005: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + link_network_server_pcm_005: + type: tosca.capabilities.network.Linkable + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1_server_pcm_005: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..a0063b174e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,240 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + oam_net_ips: + label: OAM network ips + hidden: false + immutable: false + type: list + description: OAM network ips + entry_schema: + type: string + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_server_names: + label: PCRF CM server names + hidden: false + immutable: false + type: list + description: name of the PCRF CM instance + entry_schema: + type: string + pcm_image_name: + label: PCRF CM image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + cps_net_ips: + label: CPS network ips + hidden: false + immutable: false + type: list + description: CPS network ips + entry_schema: + type: string + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + pcm_volumes: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: list + description: CPS Cluman Cinder Volume + entry_schema: + type: string + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + server_pcm_002: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + pcm_flavor_name: + get_input: pcm_flavor_name + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_image_name: + get_input: pcm_image_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + pcm_server_name: + get_input: + - pcm_server_names + - 0 + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + oam_net_gw: + get_input: oam_net_gw + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + oam_net_ip: + get_input: + - oam_net_ips + - 0 + oam_net_mask: + get_input: oam_net_mask + oam_net_name: + get_input: oam_net_name + server_pcm_004: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + server_pcm_003: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + groups: + hot-nimbus-pcm_v0.4_2: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_004 + - server_pcm_003 + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_002 + - server_pcm_001 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..39fb736465 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,291 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + cps_net_ips: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_volumes: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + label: OAM network ip + hidden: false + immutable: false + type: string + description: OAM network ip + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + server_pcm_005: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1_2ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + network: + type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork + properties: + network_name: + get_input: cps_net_name + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - server_pcm_005 + - pcm_port_0 + - network + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + host_server_pcm: + - server_pcm + - host + host_server_pcm_server_pcm_005: + - server_pcm_005 + - host_server_pcm + os_server_pcm_server_pcm_005: + - server_pcm_005 + - os_server_pcm + scalable_server_pcm_server_pcm_005: + - server_pcm_005 + - scalable_server_pcm + binding_server_pcm_server_pcm_005: + - server_pcm_005 + - binding_server_pcm + endpoint_server_pcm_server_pcm_005: + - server_pcm_005 + - endpoint_server_pcm + attachment_network_server_pcm_005: + - server_pcm_005 + - attachment_network + attachment_network: + - network + - attachment + binding_server_pcm: + - server_pcm + - binding + link_network: + - network + - link + attachment_pcm_port_0_server_pcm_005: + - server_pcm_005 + - attachment_pcm_port_0 + os_server_pcm: + - server_pcm + - os + link_network_server_pcm_005: + - server_pcm_005 + - link_network + scalable_server_pcm: + - server_pcm + - scalable + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + attachment_pcm_port_1_server_pcm_005: + - server_pcm_005 + - attachment_pcm_port_1 + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + link_pcm_port_1_server_pcm_005: + - server_pcm_005 + - link_pcm_port_1 + link_pcm_port_0_server_pcm_005: + - server_pcm_005 + - link_pcm_port_0 + local_storage_server_pcm: + - server_pcm + - local_storage + local_storage_server_pcm_server_pcm_005: + - server_pcm_005 + - local_storage_server_pcm \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml new file mode 100644 index 0000000000..a80a5811b1 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/expectedoutputfiles/nested-pcm_v0.1_2ServiceTemplate.yaml @@ -0,0 +1,205 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1_2 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + hidden: false + immutable: false + type: string + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + network: + type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork + properties: + network_name: + get_input: cps_net_name + groups: + nested-pcm_v0.1_2: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1_2.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - pcm_port_0 + - network + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1_2 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + link_network: + - network + - link + os_server_pcm: + - server_pcm + - os + host_server_pcm: + - server_pcm + - host + scalable_server_pcm: + - server_pcm + - scalable + attachment_network: + - network + - attachment + binding_server_pcm: + - server_pcm + - binding + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + local_storage_server_pcm: + - server_pcm + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json new file mode 100644 index 0000000000..b4a1b43a1e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/MANIFEST.json @@ -0,0 +1,26 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.env", + "type": "HEAT_ENV" + } + ] + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + },{ + "file": "hot-nimbus-pcm_v0.4_2.yaml", + "type": "HEAT" + },{ + "file": "nested-pcm_v0.1_2.yaml", + "type": "HEAT" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env new file mode 100644 index 0000000000..78cc03e2ea --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.env @@ -0,0 +1,14 @@ +parameters: + pcm_server_names: ZRDM1PCRF01PCM001 + pcm_image_name: rhel2 + pcm_flavor_name: cps + availabilityzone_name: nova + cps_net_name: int_pcrf_net_0 + cps_net_ips: 172.26.16.113 + cps_net_mask: 255.255.255.0 + oam_net_name: oam_protected_net_0 + oam_net_ips: 107.239.64.121 + oam_net_gw: 107.239.64.1 + oam_net_mask: 255.255.255.0 + pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b + security_group_name: nimbus_security_group diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..f7d050790f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,82 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + oam_net_name: { get_param: oam_net_name } + oam_net_ip: { get_param: [oam_net_ips, 0] } + oam_net_mask: { get_param: oam_net_mask } + oam_net_gw: { get_param: oam_net_gw } + + server_pcm_002: + type: nested-pcm_v0.1.yaml + properties: + pcm_server_name: { get_param: [pcm_server_names, 0] } + pcm_image_name: { get_param: pcm_image_name } + pcm_flavor_name: { get_param: pcm_flavor_name } + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml new file mode 100644 index 0000000000..b59df84764 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/hot-nimbus-pcm_v0.4_2.yaml @@ -0,0 +1,79 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_003: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + + server_pcm_004: + type: nested-pcm_v0.1_2.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..66a03796fb --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,138 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_ips: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string + label: OAM network ip + description: OAM network ip + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + pcm_volumes: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_005: + type: nested-pcm_v0.1_2.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + script_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + + network: + type: OS::Contrail::VirtualNetwork + properties: + name: { get_param: cps_net_name} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS::Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml new file mode 100644 index 0000000000..11be0dd63b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/recursive/inputs/nested-pcm_v0.1_2.yaml @@ -0,0 +1,110 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string +resources: + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + script_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + + network: + type: OS::Contrail::VirtualNetwork + properties: + name: { get_param: cps_net_name} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS::Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..15b5e3b3a8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,161 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + indx: + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + type: string + description: Server flavor + constraints: [ + ] + key_name: + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + type: string + description: Unique ID for this VF instance + availability_zone_0: + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + type: string + description: Master bootimage volume id + sec_groups: + type: list + description: Security groups + entry_schema: + type: string + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + attributes: + vnfci_id_2: + type: string + vnfci_id_1: + type: string + requirements: + - local_storage_vnfci: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_mgmt_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_vnfci: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_mgmt_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_vnfci: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_vnfci: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_vnfci: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_vnfci: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..b07fa5b70b --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,569 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.compute: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + type_name: + hidden: false + immutable: false + type: string + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + compute_image_name: + hidden: false + immutable: false + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + num_instances: + hidden: false + immutable: false + type: float + description: number of instance of the VF_module + node_templates: + mvs_modules_custIndexVar2: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + - get_input: vf_module_id + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - fff + - get_property: + - SELF + - service_template_filter + - index_value + vf_name: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - vf_name + cloud_zone_id: + concat: + - cloud_zone_id_ + - get_property: + - SELF + - service_template_filter + - index_value + vf_instance_num: + concat: + - vf_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _bbbb + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + flavor: + a: a + b: b + e: + get_property: + - SELF + - service_template_filter + - index_value + w: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _pp + key_name: + - a + - b + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - p + - get_property: + - SELF + - service_template_filter + - index_value + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: 2 + mandatory: true + vnf_id: null + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _vm_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _hhh_ + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - _pppp + - get_property: + - SELF + - service_template_filter + - index_value + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_property: + - SELF + - service_template_filter + - index_value + mvs_modules_custIndexVar1: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + - get_input: vf_module_id + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - fff + - get_property: + - SELF + - service_template_filter + - index_value + vf_name: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - vf_name + cloud_zone_id: + concat: + - cloud_zone_id_ + - get_property: + - SELF + - service_template_filter + - index_value + vf_instance_num: + concat: + - vf_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _bbbb + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + flavor: + a: a + b: b + e: + get_property: + - SELF + - service_template_filter + - index_value + w: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _pp + key_name: + - a + - b + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - p + - get_property: + - SELF + - service_template_filter + - index_value + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: 2 + mandatory: true + vnf_id: null + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _vm_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _hhh_ + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - _pppp + - get_property: + - SELF + - service_template_filter + - index_value + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_property: + - SELF + - service_template_filter + - index_value + mvs_modules_defaultIndexVar: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + - get_input: vf_module_id + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - fff + - get_property: + - SELF + - service_template_filter + - index_value + vf_name: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - vf_name + cloud_zone_id: + concat: + - cloud_zone_id_ + - get_property: + - SELF + - service_template_filter + - index_value + vf_instance_num: + concat: + - vf_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _bbbb + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + flavor: + a: a + b: + aa: + - sss + - concat: + - dddd + - get_property: + - SELF + - service_template_filter + - index_value + - ppp + - sd + ppp: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _pppp___ + - get_property: + - SELF + - service_template_filter + - index_value + eeee: eeeeeee + e: + get_property: + - SELF + - service_template_filter + - index_value + w: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _pp + key_name: + - a + - b + - get_property: + - SELF + - service_template_filter + - index_value + - concat: + - p + - get_property: + - SELF + - service_template_filter + - index_value + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: 3 + mandatory: true + vnf_id: null + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + concat: + - get_property: + - SELF + - service_template_filter + - index_value + - _vm_instance_num_ + - get_property: + - SELF + - service_template_filter + - index_value + - _hhh_ + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - get_property: + - SELF + - service_template_filter + - index_value + - _pppp + - get_property: + - SELF + - service_template_filter + - index_value + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_property: + - SELF + - service_template_filter + - index_value + server_compute_get_attr_test: + type: org.openecomp.resource.vfc.nodes.heat.compute + properties: + flavor: compute_flavor_name + image: + get_input: compute_image_name + config_drive: + get_attribute: + - mvs_modules_defaultIndexVar + - vnfci_id_1 + - vnfci_id_2 + user_data_format: + get_attribute: + - mvs_modules_defaultIndexVar + - vnfci_id_1 + - 1 + name: compute_name + groups: + mvs.vfmodule.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.vfmodule.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - mvs_modules_custIndexVar2 + - mvs_modules_custIndexVar1 + - mvs_modules_defaultIndexVar + - server_compute_get_attr_test \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml new file mode 100644 index 0000000000..11369f9b68 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml @@ -0,0 +1,254 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: mvs.nested.heat +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.vnfci: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + indx: + hidden: false + immutable: false + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + node_templates: + vnfci: + type: org.openecomp.resource.vfc.nodes.heat.vnfci + properties: + flavor: + get_input: flavor + key_name: + get_input: key_name + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + mgmt_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: sec_groups + fixed_ips: + - ip_address: + Fn::Select: + - get_input: indx + - get_input: + - get_input: mvs_mgmt_ip_0 + allowed_address_pairs: + - ip_address: + get_input: virtual_mgmt_ip_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + network: + get_input: mgmt_net_id + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: vnfci + relationship: tosca.relationships.network.BindsTo + groups: + mvs.nested.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.nested.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - vnfci + - mgmt_port + outputs: + vnfci_id_2: + value: vnfci + vnfci_id_1: + value: vnfci + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + capabilities: + os_vnfci: + - vnfci + - os + attachment_mgmt_port: + - mgmt_port + - attachment + endpoint_vnfci: + - vnfci + - endpoint + host_vnfci: + - vnfci + - host + binding_vnfci: + - vnfci + - binding + scalable_vnfci: + - vnfci + - scalable + requirements: + local_storage_vnfci: + - vnfci + - local_storage + link_mgmt_port: + - mgmt_port + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json new file mode 100644 index 0000000000..c7729c8653 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "mvs.vfmodule.heat.yaml", + "description": "Metaswitch MVS (Metaview Server)", + "version": "2013-05-23", + "data": [ + { + "file": "mvs.vfmodule.heat.yaml", + "type": "HEAT", + "data": [ + ] + }, + { + "file": "mvs.nested.heat.yaml", + "type": "HEAT", + "data": [ + ] + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml new file mode 100644 index 0000000000..01adb51d71 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.nested.heat.yaml @@ -0,0 +1,129 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + indx: + type: number + description: Index of the current instance + +resources: + mgmt_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + network_id: { get_param: mgmt_net_id } + security_groups: [{ get_param: sec_groups }] + + fixed_ips: + - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] } + + allowed_address_pairs: + - ip_address: { get_param: virtual_mgmt_ip_0 } + + + + vnfci: + type: OS::Nova::Server + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: mgmt_port } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + +outputs: + vnfci_id_1: + value: { get_resource: vnfci } + vnfci_id_2: + value: { get_resource: vnfci } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml new file mode 100644 index 0000000000..6b42078b21 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupIndexVar/inputs/mvs.vfmodule.heat.yaml @@ -0,0 +1,228 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + type_name: + type: string + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + num_instances: + type: number + description: number of instance of the VF_module + + compute_image_name: + type: string + +resources: + mvs_modules_defaultIndexVar: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: cloud_zone_id_%index% + vf_name: "%index%vf_name" + vf_instance_num: "vf_instance_num_%index%_bbbb" + vf_component: "%index%" + vm_instance_num: "%index%_vm_instance_num_%index%_hhh_%index%%index%%index%_pppp%index%" + vnf_id: + vf_module_id: [{ get_param: vf_module_id }, "%index%", fff%index% ] + bootimage: { get_param: bootimage } + flavor: + a: a + b: + aa: [sss,dddd%index%ppp, sd] + ppp: "%index%_pppp___%index%" + eeee: eeeeeee + e: "%index%" + w: "%index%_pp" + key_name: [a,b,"%index%",p%index%] + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + indx: "%index%" + + mvs_modules_custIndexVar1: + type: OS::Heat::ResourceGroup + properties: + count: 2 + index_var: myIndex + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: cloud_zone_id_myIndex + vf_name: "myIndexvf_name" + vf_instance_num: "vf_instance_num_myIndex_bbbb" + vf_component: "myIndex" + vm_instance_num: "myIndex_vm_instance_num_myIndex_hhh_myIndexmyIndexmyIndex_ppppmyIndex" + vnf_id: + vf_module_id: [{ get_param: vf_module_id }, "myIndex", fffmyIndex ] + bootimage: { get_param: bootimage } + flavor: + a: a + b: b + e: myIndex + w: myIndex_pp + key_name: [a,b,myIndex,pmyIndex] + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + indx: "myIndex" + + mvs_modules_custIndexVar2: + type: OS::Heat::ResourceGroup + properties: + count: 2 + index_var: "%myIndex%" + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: cloud_zone_id_%myIndex% + vf_name: "%myIndex%vf_name" + vf_instance_num: "vf_instance_num_%myIndex%_bbbb" + vf_component: "%myIndex%" + vm_instance_num: "%myIndex%_vm_instance_num_%myIndex%_hhh_%myIndex%%myIndex%%myIndex%_pppp%myIndex%" + vnf_id: + vf_module_id: [{ get_param: vf_module_id }, "%myIndex%", fff%myIndex% ] + bootimage: { get_param: bootimage } + flavor: + a: a + b: b + e: "%myIndex%" + w: "%myIndex%_pp" + key_name: [a,b,"%myIndex%",p%myIndex%] + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: mvs_mgmt_ip_0 + indx: "%myIndex%" + + not_supported_resourceGroup1: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: OS::Heat::ResourceGroup + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + not_supported_resourceGroup2: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: { get_param: type_name } + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + server_compute_get_attr_test: + type: OS::Nova::Server + properties: + config_drive: {get_attr: [mvs_modules_defaultIndexVar]} + name: compute_name + image: { get_param: compute_image_name } + flavor: compute_flavor_name + user_data_format: { get_attr: [mvs_modules_defaultIndexVar , resource.1.vnfci_id_1] } + user_data: { get_attr: [mvs_modules_defaultIndexVar, resource.vnfci_id_2]} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json new file mode 100644 index 0000000000..c7729c8653 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "mvs.vfmodule.heat.yaml", + "description": "Metaswitch MVS (Metaview Server)", + "version": "2013-05-23", + "data": [ + { + "file": "mvs.vfmodule.heat.yaml", + "type": "HEAT", + "data": [ + ] + }, + { + "file": "mvs.nested.heat.yaml", + "type": "HEAT", + "data": [ + ] + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml new file mode 100644 index 0000000000..01adb51d71 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.nested.heat.yaml @@ -0,0 +1,129 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + indx: + type: number + description: Index of the current instance + +resources: + mgmt_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + network_id: { get_param: mgmt_net_id } + security_groups: [{ get_param: sec_groups }] + + fixed_ips: + - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] } + + allowed_address_pairs: + - ip_address: { get_param: virtual_mgmt_ip_0 } + + + + vnfci: + type: OS::Nova::Server + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: mgmt_port } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + +outputs: + vnfci_id_1: + value: { get_resource: vnfci } + vnfci_id_2: + value: { get_resource: vnfci } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml new file mode 100644 index 0000000000..d71dd81fbf --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupInvalid/inputs/mvs.vfmodule.heat.yaml @@ -0,0 +1,166 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + index_parameter: + type: string + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + type_name: + type: string + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + num_instances: + type: number + description: number of instance of the VF_module + + compute_image_name: + type: string + +resources: + mvs_modules: + type: OS::Heat::ResourceGroup + properties: + count: 3 + index_var: { get_param: index_parameter } + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + not_supported_resourceGroup1: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: OS::Heat::ResourceGroup + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + not_supported_resourceGroup2: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: { get_param: type_name } + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + server_compute_get_attr_test: + type: OS::Nova::Server + properties: + config_drive: {get_attr: [mvs_modules]} + name: compute_name + image: { get_param: compute_image_name } + flavor: compute_flavor_name + user_data_format: { get_attr: [mvs_modules , resource.1.vnfci_id_1] } + user_data: { get_attr: [mvs_modules, resource.vnfci_id_2]} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..ec3b692135 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,153 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.dns_nested_01: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + vf_module_id: + type: string + description: Unique ID for this VF module instance + name_with_index: + type: string + description: name parameter which will include the index value + dns_int_bearer_ips: + type: list + description: DNS Bearer IP list + entry_schema: + type: string + vnf_name: + type: string + description: Unique name for this VF instance + index: + type: float + description: index parameter + security_group: + type: string + description: security group + oam_protected_net_name: + type: string + description: OAM network where instaces will connect + dns_oam_protected_ips: + type: list + description: DNS OAM IP list + entry_schema: + type: string + dns_key: + type: string + description: server key + int_bearer_net_name: + type: string + description: Bearer network where instaces will connect + route_eth0: + type: string + description: OAM network routes + dns_names: + type: list + description: server name + entry_schema: + type: string + vnf_id: + type: string + description: Unique ID for this VF instance + availability_zone_0: + type: string + description: availability zone ID or Name + dns_image_name: + type: string + description: server image + dns_int_bearer_ipv6_ips: + type: list + description: fixed IPv6 assignment for VM's on the Bearer network + entry_schema: + type: string + dns_flavor_name: + type: string + description: server flavor + requirements: + - link_dns_oam_protected_0_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - link_dns_int_bearer_0_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_dns_servers: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + capabilities: + host_dns_servers: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + attachment_dns_int_bearer_0_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_dns_oam_protected_0_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + os_dns_servers: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + endpoint_dns_servers: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + binding_dns_servers: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_dns_servers: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..6eae1ff185 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,246 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF module instance + dns_int_bearer_ips: + hidden: false + immutable: false + type: list + description: DNS Bearer IP list + entry_schema: + type: string + vnf_name: + hidden: false + immutable: false + type: string + description: Unique name for this VF instance + oam_protected_net_name: + hidden: false + immutable: false + type: string + description: OAM network where instaces will connect + dns_oam_protected_ips: + hidden: false + immutable: false + type: list + description: DNS OAM IP list + entry_schema: + type: string + dns_key: + hidden: false + immutable: false + type: string + description: creator's ssh public key + int_bearer_net_name: + hidden: false + immutable: false + type: string + description: Bearer network where instaces will connect + route_eth0: + hidden: false + immutable: false + type: string + description: OAM network routes + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: string + description: availability zone ID or Name + DNS_shared_sec_grp_id: + hidden: false + immutable: false + type: string + description: security group UUID + node_count: + hidden: false + immutable: false + type: float + description: the number of DNS nested instances + default: 4 + dns_image_name: + hidden: false + immutable: false + type: string + description: operative system image + default: NIMBUS_DNS_3.0.2.qcow2 + dns_int_bearer_ipv6_ips: + hidden: false + immutable: false + type: list + description: fixed IP assignment for VM's on the Bearer network + entry_schema: + type: string + dns_server_names: + hidden: false + immutable: false + type: list + description: DNS VM server name list + entry_schema: + type: string + dns_flavor_name: + hidden: false + immutable: false + type: string + description: resources to by appplied on instances + default: nv.c4r4d80 + node_templates: + dns_server_group_az: + type: org.openecomp.resource.abstract.nodes.heat.dns_nested_01 + directives: + - substitutable + properties: + vf_module_id: + get_input: vf_module_id + name_with_index: + concat: + - name_ + - get_property: + - SELF + - service_template_filter + - index_value + dns_int_bearer_ips: + get_input: dns_int_bearer_ips + vnf_name: + get_input: vnf_name + index: + get_property: + - SELF + - service_template_filter + - index_value + security_group: + get_input: DNS_shared_sec_grp_id + oam_protected_net_name: + get_input: oam_protected_net_name + dns_oam_protected_ips: + get_input: dns_oam_protected_ips + dns_key: + get_input: dns_key + int_bearer_net_name: + get_input: int_bearer_net_name + route_eth0: + get_input: route_eth0 + service_template_filter: + substitute_service_template: dns_nested_01ServiceTemplate.yaml + count: + get_input: node_count + mandatory: false + dns_names: + get_input: dns_server_names + vnf_id: + get_input: vnf_id + availability_zone_0: + get_input: availability_zone_0 + dns_image_name: + get_input: dns_image_name + dns_int_bearer_ipv6_ips: + get_input: dns_int_bearer_ipv6_ips + dns_flavor_name: + get_input: dns_flavor_name + DNS_SECURITY_GROUP: + type: org.openecomp.resource.vfc.rules.nodes.heat.network.neutron.SecurityRules + properties: + name: + str_replace: + template: VF_NAME_sec_grp_DNS + params: + VF_NAME: + get_input: vnf_name + description: vscp security group + rules: + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: egress + - protocol: tcp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: udp + ethertype: IPv4 + port_range_max: 65535 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + port_range_min: 1 + - protocol: icmp + ethertype: IPv4 + remote_ip_prefix: 0.0.0.0/0 + direction: ingress + requirements: + - port: + capability: attachment_dns_int_bearer_0_port + node: dns_server_group_az + relationship: org.openecomp.relationships.AttachesTo + - port: + capability: attachment_dns_oam_protected_0_port + node: dns_server_group_az + relationship: org.openecomp.relationships.AttachesTo + groups: + base_dns: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/base_dns.yaml + description: | + Base HOT template to create The Security Group for the the DNS VNF + members: + - DNS_SECURITY_GROUP + dns_az_01: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/dns_az_01.yaml + description: DNS master template + members: + - dns_server_group_az \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml new file mode 100644 index 0000000000..db6b3a0179 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/expectedoutputfiles/dns_nested_01ServiceTemplate.yaml @@ -0,0 +1,249 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: dns_nested_01 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.dns: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF module instance + name_with_index: + hidden: false + immutable: false + type: string + description: name parameter which will include the index value + dns_int_bearer_ips: + hidden: false + immutable: false + type: list + description: DNS Bearer IP list + entry_schema: + type: string + vnf_name: + hidden: false + immutable: false + type: string + description: Unique name for this VF instance + index: + hidden: false + immutable: false + type: float + description: index parameter + security_group: + hidden: false + immutable: false + type: string + description: security group + oam_protected_net_name: + hidden: false + immutable: false + type: string + description: OAM network where instaces will connect + dns_oam_protected_ips: + hidden: false + immutable: false + type: list + description: DNS OAM IP list + entry_schema: + type: string + dns_key: + hidden: false + immutable: false + type: string + description: server key + int_bearer_net_name: + hidden: false + immutable: false + type: string + description: Bearer network where instaces will connect + route_eth0: + hidden: false + immutable: false + type: string + description: OAM network routes + dns_names: + hidden: false + immutable: false + type: list + description: server name + entry_schema: + type: string + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: string + description: availability zone ID or Name + dns_image_name: + hidden: false + immutable: false + type: string + description: server image + dns_int_bearer_ipv6_ips: + hidden: false + immutable: false + type: list + description: fixed IPv6 assignment for VM's on the Bearer network + entry_schema: + type: string + dns_flavor_name: + hidden: false + immutable: false + type: string + description: server flavor + node_templates: + dns_oam_protected_0_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group + fixed_ips: + - ip_address: + get_input: + - dns_oam_protected_ips + - get_input: index + name: + str_replace: + template: VNF_NAME_dns_oam_port + params: + VNF_NAME: + get_input: vnf_name + network: + get_input: oam_protected_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: dns_servers + relationship: tosca.relationships.network.BindsTo + dns_int_bearer_0_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group + fixed_ips: + - ip_address: + get_input: + - dns_int_bearer_ips + - get_input: index + - ip_address: + get_input: + - dns_int_bearer_ipv6_ips + - get_input: index + name: + str_replace: + template: VNF_NAME_dns_bearer_port + params: + VNF_NAME: + get_input: vnf_name + network: + get_input: int_bearer_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: dns_servers + relationship: tosca.relationships.network.BindsTo + dns_servers: + type: org.openecomp.resource.vfc.nodes.heat.dns + properties: + flavor: + get_input: dns_flavor_name + key_name: + get_input: dns_key + availability_zone: + get_input: availability_zone_0 + image: + get_input: dns_image_name + metadata: + vf_module_id: + get_input: vf_module_id + vnf_name {get_param: vnf_name } + vnf_id: + get_input: vnf_id + user_data_format: RAW + name: + get_input: + - dns_names + - get_input: index + groups: + dns_nested_01: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/dns_nested_01.yaml + description: | + nested DNS template for a single VM + all parameters are passed from calling heat template of resourcegroup + members: + - dns_oam_protected_0_port + - dns_int_bearer_0_port + - dns_servers + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.dns_nested_01 + capabilities: + host_dns_servers: + - dns_servers + - host + attachment_dns_int_bearer_0_port: + - dns_int_bearer_0_port + - attachment + attachment_dns_oam_protected_0_port: + - dns_oam_protected_0_port + - attachment + os_dns_servers: + - dns_servers + - os + endpoint_dns_servers: + - dns_servers + - endpoint + binding_dns_servers: + - dns_servers + - binding + scalable_dns_servers: + - dns_servers + - scalable + requirements: + local_storage_dns_servers: + - dns_servers + - local_storage + link_dns_oam_protected_0_port: + - dns_oam_protected_0_port + - link + link_dns_int_bearer_0_port: + - dns_int_bearer_0_port + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json new file mode 100644 index 0000000000..0fa0f714da --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/MANIFEST.json @@ -0,0 +1,37 @@ +{ + "name": "", + "description": "", + "data": [ + { + "file": "dns_nested_01.yaml", + "type": "HEAT", + "isBase": "false" + }, + { + "file": "base_dns.yaml", + "type": "HEAT", + "isBase": "true", + "data": [ + { + "file": "base_dns.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "dns_az_01.yaml", + "type": "HEAT", + "isBase": "false", + "data": [ + { + "file": "dns_az_01.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "nimbus-willows-2.pem", + "type": "OTHER" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env new file mode 100644 index 0000000000..3ab724f7ab --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.env @@ -0,0 +1,8 @@ +##NIMBUS - DNS Base Template ENV File +#AUTHORS: + +##################### +parameters: +##################### + +# vnf_name: 'zrdm3mdns01' diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml new file mode 100644 index 0000000000..821f10212f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/base_dns.yaml @@ -0,0 +1,43 @@ +heat_template_version: 2015-04-30 +#Nimbus DNS Base Template +#AUTHORS: +description: > + Base HOT template to create The Security Group for the the DNS VNF + +##################### +parameters: +##################### + +## GLOBAL//Basic Parameters + vnf_name: + type: string + description: Unique name for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + +##################### +resources: +##################### + + DNS_SECURITY_GROUP: + type: OS::Neutron::SecurityGroup + properties: + description: vscp security group + name: + str_replace: + template: VF_NAME_sec_grp_DNS + params: + VF_NAME: {get_param: vnf_name} + rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0}, + {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0} + ] + + +outputs: + DNS_shared_sec_grp_id: + description: UUID of DNS Resource SecurityGroup + value: { get_resource: DNS_SECURITY_GROUP } + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env new file mode 100644 index 0000000000..8e0e80c67f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.env @@ -0,0 +1,21 @@ +parameters: + dns_image_name: NIMBUS_DNS_3.0.2.qcow2 + dns_flavor_name: nv.c4r4d80 +# dns_key: nimbus-willows-1 +# oam_protected_net_name: MNS-25180-L-06Shared_OAM_PROTECTED_NET_1 +# int_bearer_net_name: Nimbus-25193-T-Willows1_int_fw_dns_trusted_net_1 + node_count: 4 +# dns_oam_protected_ips: 107.239.81.114,107.239.81.115,107.239.81.116,107.239.81.117 +# dns_int_bearer_ips: 172.26.18.64,172.26.18.65,172.26.18.66,172.26.18.67 +# dns_int_bearer_ipv6_ips: fd00:2600:2600:101::40,fd00:2600:2600:101::41,fd00:2600:2600:101::42,fd00:2600:2600:101::43 +# dns_server_names: zrdm3mdns01cmd001,zrdm3mdns01cmd002,zrdm3mdns01cmd003,zrdm3mdns01cmd004 +# route_eth0: | +# 10.147.38.211/32 via 107.239.81.1 dev eth0 +# 155.165.201.253/32 via 107.239.81.1 dev eth0 +# 141.204.0.0/16 via 107.239.81.1 dev eth0 +# DNS_shared_sec_grp_id: 5f809b4c-a1af-4064-86ef-0aebb761a749 +# availability_zone_0: rdm3-kvm-az01 +# vnf_name: 'zrdm3mdns01' +# vnf_id: 'dummy' +# vf_module_id: 'dummy' + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml new file mode 100644 index 0000000000..84aacaba35 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_az_01.yaml @@ -0,0 +1,94 @@ +heat_template_version: 2014-10-16 + +description: DNS master template + +parameters: + dns_image_name: + type: string + description: operative system image + dns_flavor_name: + type: string + description: resources to by appplied on instances + dns_key: + type: string + description: creator's ssh public key + node_count: + type: number + description: the number of DNS nested instances + oam_protected_net_name: + type: string + description: OAM network where instaces will connect + int_bearer_net_name: + type: string + description: Bearer network where instaces will connect + dns_oam_protected_ips: + type: comma_delimited_list + description: DNS OAM IP list + dns_int_bearer_ips: + type: comma_delimited_list + description: DNS Bearer IP list + dns_int_bearer_ipv6_ips: + type: comma_delimited_list + description: fixed IP assignment for VM's on the Bearer network + dns_server_names: + type: comma_delimited_list + description: DNS VM server name list + route_eth0: + type: string + description: OAM network routes + DNS_shared_sec_grp_id: + type: string + description: security group UUID + availability_zone_0: + type: string + description: availability zone ID or Name + vnf_name: + type: string + description: Unique name for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vnf_id: + type: string + description: Unique ID for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vf_module_id: + type: string + description: Unique ID for this VF module instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + + +resources: + dns_server_group_az: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: node_count } + index_var: index + resource_def: + type: dns_nested_01.yaml + properties: + index: index + name_with_index: name_index + dns_image_name: { get_param: dns_image_name } + dns_flavor_name: { get_param: dns_flavor_name } + dns_key: { get_param: dns_key } + availability_zone_0: { get_param: availability_zone_0 } + security_group: { get_param: DNS_shared_sec_grp_id } + oam_protected_net_name: { get_param: oam_protected_net_name } + int_bearer_net_name: { get_param: int_bearer_net_name } + dns_oam_protected_ips: { get_param: dns_oam_protected_ips } + dns_int_bearer_ips: { get_param: dns_int_bearer_ips } + dns_int_bearer_ipv6_ips: { get_param: dns_int_bearer_ipv6_ips } + dns_names: { get_param: dns_server_names } + route_eth0: { get_param: route_eth0 } + vnf_name: { get_param: vnf_name } + vnf_id: { get_param: vnf_id } + vf_module_id: {get_param: vf_module_id} + +#outputs: +# vm_name: +# description: VM name +# value: { get_attr: [ dns_server_group_az, vm_name ] } +# networks: +# description: networks +# value: { get_attr: [ dns_server_group_az, networks ] } + + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml new file mode 100644 index 0000000000..5be9d49bb0 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/dns_nested_01.yaml @@ -0,0 +1,127 @@ +heat_template_version: 2014-10-16 + +description: | + nested DNS template for a single VM + all parameters are passed from calling heat template of resourcegroup + +parameters: + dns_image_name: + type: string + description: server image + dns_flavor_name: + type: string + description: server flavor + dns_key: + type: string + description: server key + oam_protected_net_name: + type: string + description: OAM network where instaces will connect + int_bearer_net_name: + type: string + description: Bearer network where instaces will connect + dns_oam_protected_ips: + type: comma_delimited_list + description: DNS OAM IP list + dns_int_bearer_ips: + type: comma_delimited_list + description: DNS Bearer IP list + dns_int_bearer_ipv6_ips: + type: comma_delimited_list + description: fixed IPv6 assignment for VM's on the Bearer network + dns_names: + type: comma_delimited_list + description: server name + route_eth0: + type: string + description: OAM network routes + index: + type: number + description: index parameter + name_with_index: + type: string + description: name parameter which will include the index value + security_group: + type: string + description: security group + availability_zone_0: + type: string + description: availability zone ID or Name +# this parameter does not follow the D2 Guidelines. This value will be az0 or az1. + vnf_name: + type: string + description: Unique name for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vnf_id: + type: string + description: Unique ID for this VF instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + vf_module_id: + type: string + description: Unique ID for this VF module instance +# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC + + +resources: + + dns_oam_protected_0_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: VNF_NAME_dns_oam_port + params: + VNF_NAME: {get_param: vnf_name} + network: { get_param: oam_protected_net_name } + fixed_ips: [{ "ip_address": { get_param: [ dns_oam_protected_ips, get_param: index ]}}] + security_groups: [{ get_param: security_group }] + + dns_int_bearer_0_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: VNF_NAME_dns_bearer_port + params: + VNF_NAME: {get_param: vnf_name} + network: { get_param: int_bearer_net_name } + fixed_ips: [{ "ip_address": { get_param: [ dns_int_bearer_ips, get_param: index ]}}, { "ip_address": { get_param: [ dns_int_bearer_ipv6_ips, get_param: index ]}}] + security_groups: [{ get_param: security_group }] + + dns_servers: + type: OS::Nova::Server + properties: + name: { get_param: [ dns_names, get_param: index ] } + image: { get_param: dns_image_name } + flavor: { get_param: dns_flavor_name } + key_name: { get_param: dns_key } + availability_zone: { get_param: availability_zone_0 } + networks: + - port: { get_resource: dns_oam_protected_0_port } + - port: { get_resource: dns_int_bearer_0_port } + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + vnf_name {get_param: vnf_name } + user_data_format: RAW + user_data: { get_resource: server_interface_config } + + server_interface_config: + type: OS::Heat::CloudConfig + properties: + cloud_config: + write_files: + - path: /etc/sysconfig/network-scripts/route-eth0 + permissions: "0644" +# content: { get_file: route-eth0 } + content: { get_param: route_eth0 } + +#outputs: +# vm_name: +# description: VM name +# value: { get_attr: [ dns_servers, name] } +# networks: +# description: networks +# value: { get_attr: [ dns_servers, networks ] } + + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem new file mode 100644 index 0000000000..ca613f176c --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resourceGroupMDNS/inputs/nimbus-willows-2.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEA4JxAkJFmleoEjBIs+ZHH1yYn0uFtLnN2JX7alC9t/4LUgShK +CWHg+NZgCp1rCCfEZ16OMIlJViaw3i50BwSbh71vHHLfgpbKuCaxVblSsokWJf1P +vNjcpb1uE4/GgAGTOvVpBJ67aSFL2cqN0RRmoDkXD0Es0Oog7X2/DSXex6rSfWrh +I6RplcvljEOp3svhZxrCM5B9byn9931eja0NpJmggDQqzlrh6s01iqQKSZ3C6Cp4 +g0YMff3FP6b6xWbt/2wK2aR5/so64LZmBbxJHgBkQOAUsUdt6aWgx9lUKAly1KFo +4+E67IX9k6KR/ZA67hny2UHg5Rz9J/YTvJYT5QIDAQABAoIBAFnh7Wxs4zKGzX8I +HvtYPTJ50GHxV/HIvrTOiMXYHRqszkFJUCdlBdROZWyaBiTjVRNQoXIG3lQdc5XV +3RSZ4Wt2gSpPReZKVaFPypNVcCSF+1kEf45A8jtZDN3DIVpERxjG8Fmq87BkZKgp +CItssIzZi8LNABQyPS8MrRGj3/ziPMNqyMaZao+nI4sQVoVIID5LMhCjFby5Afx9 +6DHOMgkySCqhUVox9rG9sNSyStElJaIUyrel0ZM51C6zMbKftrHcgRyzCbJSzSGy +yMFyAQCc+OzJ5ulcHMMSGrwsQv1EN5ck4W5SjUUPS90a7LdAi5Qap6nkLrOaieKc +Xt/p+xkCgYEA/yqPa9jQMAHEj8aPpbZ8M+25m0hfrojYm0AdpVceHKualI8mfNOC +J+Y8ivMcmx5dey1Y+SlQZCv+nOKaJPz6yIppZLoDVm1JCcV4n16NtCWbGma/QGKL +QDxfC2WdMLjCRFYOFXg6PQybYL0a4jjNMB7MmgHv0PGojzxVnk2Tw3cCgYEA4Vgh +/dHncYAFWgG3g8zNbWqWOwJVT9Qxk4wX5KJbwSrumGXcvJFpYWhXZqZB9UF32n0f +bIb+N0swa0MmU+aXM0iBsUxaso7nPeiKuszzZ43/Z4xckkoPJfkw0VXAD5W0z+7i +bQW+lDjbH0i/xty0LWrCJzCUVfYPCK84qXpm4oMCgYEA37r6jA5L5Hv4VDQ+yYbq ++kErp/raYld8zQt3svxi27KfVDj7/yEZE1DtrsuhPmVug81sIPPXmC13DyolC9+B +KIssA/SRbpteGiI6NEqcpuL+TzTd5l9BR65ni7+qBwlI1NA7gxmqvtKp/jVxN/+j +8dhff33JP4RUTlsRmz7cG9sCgYBBxE4PXQ6WMo3dSfj8T255C42S5Uhuxvg9Hrru +cHAk/VmrQrdclXfTBPfVLpq7cIMBUlk0fGV/T8Nu2qc5/2eLgRLQ4v7pdAmLKO4s +PJqhU3ECEJYH3/Nx2rtjrQojwkaGFSsiNHX9nmZdSAcoi8tOIgVOGMCCIhEbMMBx +vhZ+7wKBgQDizYvqTOyODzi3cebk7LzbSg+r1cNE9onvCVej+pnznt5oQtniAzS6 +GbGyKsDHDtmQ15tXdnU2KkTcsXEs9nFxIsOR2QZtQRcMSuRtye5o2qPXf0HdHW/M +5mheJi2LfaNP5csauJ/WUJYbAS4cn7dz4xUos+7la58upB/or+Q/cg== +-----END RSA PRIVATE KEY----- diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..15b5e3b3a8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,161 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + indx: + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + type: string + description: Server flavor + constraints: [ + ] + key_name: + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + type: string + description: Unique ID for this VF instance + availability_zone_0: + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + type: string + description: Master bootimage volume id + sec_groups: + type: list + description: Security groups + entry_schema: + type: string + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + attributes: + vnfci_id_2: + type: string + vnfci_id_1: + type: string + requirements: + - local_storage_vnfci: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_mgmt_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_vnfci: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_mgmt_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_vnfci: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_vnfci: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_vnfci: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + scalable_vnfci: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..632afc51b3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,223 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.compute: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + type_name: + hidden: false + immutable: false + type: string + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + compute_image_name: + hidden: false + immutable: false + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + num_instances: + hidden: false + immutable: false + type: float + description: number of instance of the VF_module + node_templates: + mvs_modules: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + get_input: vf_module_id + vf_name: + get_input: vf_name + cloud_zone_id: + get_input: cloud_zone_id + vf_instance_num: + get_input: vf_instance_num + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: + get_input: mvs_mgmt_ip_0 + flavor: + get_input: flavor + key_name: + get_input: key_name + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: 3 + mandatory: true + vnf_id: + get_input: vnf_id + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + get_input: vm_instance_num + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_input: vf_component + server_compute_get_attr_test: + type: org.openecomp.resource.vfc.nodes.heat.compute + properties: + flavor: compute_flavor_name + image: + get_input: compute_image_name + config_drive: + get_attribute: + - mvs_modules + - vnfci_id_1 + - vnfci_id_2 + user_data_format: + get_attribute: + - mvs_modules + - vnfci_id_1 + - 1 + name: compute_name + groups: + mvs.vfmodule.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.vfmodule.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - mvs_modules + - server_compute_get_attr_test \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml new file mode 100644 index 0000000000..11369f9b68 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml @@ -0,0 +1,254 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: mvs.nested.heat +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.vnfci: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + indx: + hidden: false + immutable: false + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + node_templates: + vnfci: + type: org.openecomp.resource.vfc.nodes.heat.vnfci + properties: + flavor: + get_input: flavor + key_name: + get_input: key_name + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + mgmt_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: sec_groups + fixed_ips: + - ip_address: + Fn::Select: + - get_input: indx + - get_input: + - get_input: mvs_mgmt_ip_0 + allowed_address_pairs: + - ip_address: + get_input: virtual_mgmt_ip_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + network: + get_input: mgmt_net_id + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: vnfci + relationship: tosca.relationships.network.BindsTo + groups: + mvs.nested.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.nested.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - vnfci + - mgmt_port + outputs: + vnfci_id_2: + value: vnfci + vnfci_id_1: + value: vnfci + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + capabilities: + os_vnfci: + - vnfci + - os + attachment_mgmt_port: + - mgmt_port + - attachment + endpoint_vnfci: + - vnfci + - endpoint + host_vnfci: + - vnfci + - host + binding_vnfci: + - vnfci + - binding + scalable_vnfci: + - vnfci + - scalable + requirements: + local_storage_vnfci: + - vnfci + - local_storage + link_mgmt_port: + - mgmt_port + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json new file mode 100644 index 0000000000..c7729c8653 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "mvs.vfmodule.heat.yaml", + "description": "Metaswitch MVS (Metaview Server)", + "version": "2013-05-23", + "data": [ + { + "file": "mvs.vfmodule.heat.yaml", + "type": "HEAT", + "data": [ + ] + }, + { + "file": "mvs.nested.heat.yaml", + "type": "HEAT", + "data": [ + ] + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml new file mode 100644 index 0000000000..01adb51d71 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.nested.heat.yaml @@ -0,0 +1,129 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + indx: + type: number + description: Index of the current instance + +resources: + mgmt_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + network_id: { get_param: mgmt_net_id } + security_groups: [{ get_param: sec_groups }] + + fixed_ips: + - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] } + + allowed_address_pairs: + - ip_address: { get_param: virtual_mgmt_ip_0 } + + + + vnfci: + type: OS::Nova::Server + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: mgmt_port } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + +outputs: + vnfci_id_1: + value: { get_resource: vnfci } + vnfci_id_2: + value: { get_resource: vnfci } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml new file mode 100644 index 0000000000..380ceae2ff --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group/inputs/mvs.vfmodule.heat.yaml @@ -0,0 +1,163 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + type_name: + type: string + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + num_instances: + type: number + description: number of instance of the VF_module + + compute_image_name: + type: string + +resources: + mvs_modules: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + not_supported_resourceGroup1: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: OS::Heat::ResourceGroup + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + not_supported_resourceGroup2: + type: OS::Heat::ResourceGroup + properties: + count: 3 + resource_def: + type: { get_param: type_name } + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + availability_zone_0: { get_param: availability_zone_0 } + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + indx: "%index%" + + server_compute_get_attr_test: + type: OS::Nova::Server + properties: + config_drive: {get_attr: [mvs_modules]} + name: compute_name + image: { get_param: compute_image_name } + flavor: compute_flavor_name + user_data_format: { get_attr: [mvs_modules , resource.1.vnfci_id_1] } + user_data: { get_attr: [mvs_modules, resource.vnfci_id_2]} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..1b1c4dd621 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,166 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + indx: + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + type: string + description: Server flavor + constraints: [ + ] + key_name: + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + type: string + description: Unique ID for this VF instance + availability_zone_0: + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + type: string + description: Master bootimage volume id + sec_groups: + type: list + description: Security groups + entry_schema: + type: string + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + requirements: + - local_storage_vnfci: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_mgmt_port: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + os_vnfci: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + attachment_mgmt_port: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + endpoint_vnfci: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + host_vnfci: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + binding_vnfci: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_boot_volume: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + scalable_vnfci: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + attachment_data_volume: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..b3b1349b36 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,195 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + num_instances: + hidden: false + immutable: false + type: float + description: number of instance of the VF_module + node_templates: + mvs_modules: + type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + directives: + - substitutable + properties: + vf_module_id: + get_input: vf_module_id + vf_name: + get_input: vf_name + cloud_zone_id: + get_input: cloud_zone_id + vf_instance_num: + get_input: vf_instance_num + virtual_mgmt_ip_0: + get_input: virtual_mgmt_ip_0 + indx: + get_property: + - SELF + - service_template_filter + - index_value + mvs_mgmt_ip_0: + get_input: mvs_mgmt_ip_0 + flavor: + get_input: flavor + key_name: + get_input: key_name + service_template_filter: + substitute_service_template: mvs.nested.heatServiceTemplate.yaml + count: + get_input: num_instances + mandatory: false + vnf_id: + get_input: vnf_id + availability_zone_0: + get_input: availability_zone_0 + mgmt_net_id: + get_input: mgmt_net_id + vm_instance_num: + get_input: vm_instance_num + bootimage: + get_input: bootimage + sec_groups: + get_input: sec_groups + vf_component: + get_input: vf_component + groups: + mvs.vfmodule.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.vfmodule.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - mvs_modules \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml new file mode 100644 index 0000000000..315318d4f6 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/expectedoutputfiles/mvs.nested.heatServiceTemplate.yaml @@ -0,0 +1,320 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: mvs.nested.heat +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.vnfci: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + vf_module_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF_MODULE instance + vf_name: + hidden: false + immutable: false + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 4 + - min_length: 4 + cloud_zone_id: + hidden: false + immutable: false + type: string + description: The cloud zone for this VF instance + vf_instance_num: + hidden: false + immutable: false + type: string + description: The number for this VF instance + constraints: + - pattern: '[0-9]+' + - max_length: 2 + - min_length: 2 + virtual_mgmt_ip_0: + hidden: false + immutable: false + type: string + description: Virtual management network ip address + indx: + hidden: false + immutable: false + type: float + description: Index of the current instance + mvs_mgmt_ip_0: + hidden: false + immutable: false + type: list + description: List of Management network IP addresses for IPv4 + entry_schema: + type: string + flavor: + hidden: false + immutable: false + type: string + description: Server flavor + constraints: [ + ] + key_name: + hidden: false + immutable: false + type: string + description: SSH key name + constraints: [ + ] + vnf_id: + hidden: false + immutable: false + type: string + description: Unique ID for this VF instance + availability_zone_0: + hidden: false + immutable: false + type: list + description: List of Availability Zone IDs or Names + entry_schema: + type: string + mgmt_net_id: + hidden: false + immutable: false + type: string + description: Neutron UUID for the Management network + constraints: [ + ] + vm_instance_num: + hidden: false + immutable: false + type: list + description: VM instance number list must be a list of three-digit numeric value + entry_schema: + type: string + bootimage: + hidden: false + immutable: false + type: string + description: Master bootimage volume id + sec_groups: + hidden: false + immutable: false + type: list + description: Security groups + entry_schema: + type: string + vf_component: + hidden: false + immutable: false + type: string + description: The component that this VF instance is running + constraints: + - pattern: '[a-zA-Z0-9]+' + - max_length: 3 + - min_length: 3 + node_templates: + boot_volume: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + image: + get_input: bootimage + size: 35*1024 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + vnfci: + type: org.openecomp.resource.vfc.nodes.heat.vnfci + properties: + flavor: + get_input: flavor + key_name: + get_input: key_name + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + requirements: + - local_storage: + capability: tosca.capabilities.Attachment + node: boot_volume + relationship: tosca.relationships.AttachesTo + - local_storage: + capability: tosca.capabilities.Attachment + node: data_volume + relationship: tosca.relationships.AttachesTo + data_volume: + type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume + properties: + availability_zone: + Fn::Select: + - get_input: indx + - get_input: + - availability_zone_0 + size: 265*1024 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + mgmt_port: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: sec_groups + fixed_ips: + - ip_address: + Fn::Select: + - get_input: indx + - get_input: + - get_input: mvs_mgmt_ip_0 + allowed_address_pairs: + - ip_address: + get_input: virtual_mgmt_ip_0 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $VF_NAME: + get_input: vf_name + $CLOUD_ZONE_ID: + get_input: cloud_zone_id + $VM_INSTANCE_NUM: + Fn::Select: + - get_input: indx + - get_input: + - vm_instance_num + $VF_COMPONENT: + get_input: vf_component + $VF_INSTANCE_NUM: + get_input: vf_instance_num + network: + get_input: mgmt_net_id + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: vnfci + relationship: tosca.relationships.network.BindsTo + groups: + mvs.nested.heat: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/mvs.nested.heat.yaml + description: | + Metaswitch MVS (Metaview Server) + members: + - boot_volume + - vnfci + - data_volume + - mgmt_port + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.mvs.nested.heat + capabilities: + os_vnfci: + - vnfci + - os + attachment_mgmt_port: + - mgmt_port + - attachment + endpoint_vnfci: + - vnfci + - endpoint + host_vnfci: + - vnfci + - host + binding_vnfci: + - vnfci + - binding + attachment_boot_volume: + - boot_volume + - attachment + scalable_vnfci: + - vnfci + - scalable + attachment_data_volume: + - data_volume + - attachment + requirements: + local_storage_vnfci: + - vnfci + - local_storage + link_mgmt_port: + - mgmt_port + - link \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json new file mode 100644 index 0000000000..c7729c8653 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "mvs.vfmodule.heat.yaml", + "description": "Metaswitch MVS (Metaview Server)", + "version": "2013-05-23", + "data": [ + { + "file": "mvs.vfmodule.heat.yaml", + "type": "HEAT", + "data": [ + ] + }, + { + "file": "mvs.nested.heat.yaml", + "type": "HEAT", + "data": [ + ] + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml new file mode 100644 index 0000000000..8ddc5c6488 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.nested.heat.yaml @@ -0,0 +1,165 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + indx: + type: number + description: Index of the current instance + +resources: + mgmt_port: + type: OS::Neutron::Port + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-mgmt-port + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + network_id: { get_param: mgmt_net_id } + security_groups: [{ get_param: sec_groups }] + + fixed_ips: + - ip_address: { "Fn::Select" : [ { get_param: indx }, { get_param: [{ get_param: mvs_mgmt_ip_0 }] } ] } + + allowed_address_pairs: + - ip_address: { get_param: virtual_mgmt_ip_0 } + + boot_volume: + type: OS::Cinder::Volume + properties: + size: 35 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-boot-volume + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + + image: { get_param: bootimage } + + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + + data_volume: + type: OS::Cinder::Volume + properties: + size: 265 + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM-data-volume + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + + vnfci: + type: OS::Nova::Server + properties: + name: + str_replace: + template: Z$CLOUD_ZONE_ID$VF_NAME$VF_INSTANCE_NUM$VF_COMPONENT$VM_INSTANCE_NUM + params: + $CLOUD_ZONE_ID: { get_param: cloud_zone_id } + $VF_NAME: { get_param: vf_name } + $VF_INSTANCE_NUM: { get_param: vf_instance_num } + $VF_COMPONENT: { get_param: vf_component } + $VM_INSTANCE_NUM: { "Fn::Select" : [ { get_param: indx }, { get_param: [vm_instance_num] } ] } + block_device_mapping: + - device_name: vda + volume_id: { get_resource: boot_volume } + delete_on_termination: false + - device_name: vdb + volume_id: { get_resource: data_volume } + delete_on_termination: false + flavor: { get_param: flavor } + key_name: { get_param: key_name } + networks: + - port: { get_resource: mgmt_port } + + availability_zone: { "Fn::Select" : [ { get_param: indx }, { get_param: [availability_zone_0] } ] } + + metadata: + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml new file mode 100644 index 0000000000..95ca069bf8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/resource_group_with_dynamic_count/inputs/mvs.vfmodule.heat.yaml @@ -0,0 +1,105 @@ +heat_template_version: 2013-05-23 + +description: > + Metaswitch MVS (Metaview Server) + +parameters: + cloud_zone_id: + type: string + description: The cloud zone for this VF instance + vf_name: + type: string + description: The VF Name; defaults to VMVM for the virtual MVM VNF. + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 4, max: 4 } + description: Each VF will have a 4-character alphanumeric identifier + vf_instance_num: + type: string + description: The number for this VF instance + constraints: + - allowed_pattern: "[0-9]+" + - length: { min: 2, max: 2 } + description: VF instance number must be a two-digit numeric value + vf_component: + type: string + description: The component that this VF instance is running + constraints: + - allowed_pattern: "[a-zA-Z0-9]+" + - length: { min: 3, max: 3 } + description: Each VF component will have a 3-character alphanumeric identifier + vm_instance_num: + type: comma_delimited_list + description: VM instance number list must be a list of three-digit numeric value + vnf_id: + type: string + description: Unique ID for this VF instance + vf_module_id: + type: string + description: Unique ID for this VF_MODULE instance + bootimage: + type: string + description: Master bootimage volume id + flavor: + type: string + description: Server flavor + constraints: + - custom_constraint: nova.flavor + key_name: + type: string + description: SSH key name + constraints: + - custom_constraint: nova.keypair + + availability_zone_0: + type: comma_delimited_list + description: List of Availability Zone IDs or Names + + sec_groups: + type: comma_delimited_list + description: Security groups + mgmt_net_id: + type: string + description: Neutron UUID for the Management network + constraints: + - custom_constraint: neutron.network + virtual_mgmt_ip_0: + type: string + description: Virtual management network ip address + + mvs_mgmt_ip_0: + type: comma_delimited_list + description: List of Management network IP addresses for IPv4 + + num_instances: + type: number + description: number of instance of the VF_module + +resources: + mvs_modules: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: mvs.nested.heat.yaml + properties: + cloud_zone_id: { get_param: cloud_zone_id } + vf_name: { get_param: vf_name } + vf_instance_num: { get_param: vf_instance_num } + vf_component: { get_param: vf_component } + vm_instance_num: { get_param: vm_instance_num } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + bootimage: { get_param: bootimage } + flavor: { get_param: flavor } + key_name: { get_param: key_name } + + availability_zone_0: { get_param: availability_zone_0 } + + sec_groups: { get_param: sec_groups } + mgmt_net_id: { get_param: mgmt_net_id } + virtual_mgmt_ip_0: { get_param: virtual_mgmt_ip_0 } + + mvs_mgmt_ip_0: { get_param: mvs_mgmt_ip_0 } + + indx: "%index%" diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..b99ba37305 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,137 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + availabilityzone_name: + type: string + description: availabilityzone name + oam_net_gw: + type: string + description: CPS network gateway + pcm_image_name: + type: string + description: PCRF CM image name + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + description: OAM network ip + oam_net_mask: + type: string + description: CPS network mask + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..ed5854c2fd --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,216 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +topology_template: + inputs: + oam_net_ips: + label: OAM network ips + hidden: false + immutable: false + type: list + description: OAM network ips + entry_schema: + type: string + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_server_names: + label: PCRF CM server names + hidden: false + immutable: false + type: list + description: name of the PCRF CM instance + entry_schema: + type: string + pcm_image_name: + label: PCRF CM image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + cps_net_ips: + label: CPS network ips + hidden: false + immutable: false + type: list + description: CPS network ips + entry_schema: + type: string + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + pcm_volumes: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: list + description: CPS Cluman Cinder Volume + entry_schema: + type: string + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + server_pcm_002: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + pcm_flavor_name: + get_input: pcm_flavor_name + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_image_name: + get_input: pcm_image_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + pcm_server_name: + get_input: + - pcm_server_names + - 0 + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + oam_net_gw: + get_input: oam_net_gw + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + oam_net_ip: + get_input: + - oam_net_ips + - 0 + oam_net_mask: + get_input: oam_net_mask + oam_net_name: + get_input: oam_net_name + server_pcm_003: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + availabilityzone_name: + get_input: availabilityzone_name + pcm_vol: + get_input: + - pcm_volumes + - 0 + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + groups: + hot-nimbus-pcm_v0.4_2: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4_2.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_003 + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_002 + - server_pcm_001 \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..1b03021742 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,207 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + label: OAM network ip + hidden: false + immutable: false + type: string + description: OAM network ip + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - pcm_port_0 + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + os_server_pcm: + - server_pcm + - os + host_server_pcm: + - server_pcm + - host + scalable_server_pcm: + - server_pcm + - scalable + binding_server_pcm: + - server_pcm + - binding + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + local_storage_server_pcm: + - server_pcm + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json new file mode 100644 index 0000000000..6f151c4f36 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/MANIFEST.json @@ -0,0 +1,23 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.env", + "type": "HEAT_ENV" + } + ] + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + },{ + "file": "hot-nimbus-pcm_v0.4_2.yaml", + "type": "HEAT" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env new file mode 100644 index 0000000000..78cc03e2ea --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.env @@ -0,0 +1,14 @@ +parameters: + pcm_server_names: ZRDM1PCRF01PCM001 + pcm_image_name: rhel2 + pcm_flavor_name: cps + availabilityzone_name: nova + cps_net_name: int_pcrf_net_0 + cps_net_ips: 172.26.16.113 + cps_net_mask: 255.255.255.0 + oam_net_name: oam_protected_net_0 + oam_net_ips: 107.239.64.121 + oam_net_gw: 107.239.64.1 + oam_net_mask: 255.255.255.0 + pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b + security_group_name: nimbus_security_group diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..f7d050790f --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,82 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + oam_net_name: { get_param: oam_net_name } + oam_net_ip: { get_param: [oam_net_ips, 0] } + oam_net_mask: { get_param: oam_net_mask } + oam_net_gw: { get_param: oam_net_gw } + + server_pcm_002: + type: nested-pcm_v0.1.yaml + properties: + pcm_server_name: { get_param: [pcm_server_names, 0] } + pcm_image_name: { get_param: pcm_image_name } + pcm_flavor_name: { get_param: pcm_flavor_name } + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml new file mode 100644 index 0000000000..72d84b64a4 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/hot-nimbus-pcm_v0.4_2.yaml @@ -0,0 +1,71 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + server_pcm_003: + type: nested-pcm_v0.1.yaml + properties: + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + + + diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..4e12676aa8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/reusenestedfrommultibase/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,114 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string + label: OAM network ip + description: OAM network ip + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + network: + type: net + script_init: + type: OS:INIT + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS::Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml new file mode 100644 index 0000000000..b99ba37305 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/GlobalSubstitutionTypesServiceTemplate.yaml @@ -0,0 +1,137 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: GlobalSubstitutionTypes +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1: + derived_from: org.openecomp.resource.abstract.nodes.AbstractSubstitute + properties: + availabilityzone_name: + type: string + description: availabilityzone name + oam_net_gw: + type: string + description: CPS network gateway + pcm_image_name: + type: string + description: PCRF CM image name + security_group_name: + type: string + description: the name of security group + cps_net_ip: + type: string + description: CPS network ip + pcm_flavor_name: + type: string + description: flavor name of PCRF CM instance + pcm_vol: + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + type: string + description: PCRF CM server name + cps_net_name: + type: string + description: CPS network name + cps_net_mask: + type: string + description: CPS network mask + oam_net_ip: + type: string + description: OAM network ip + oam_net_mask: + type: string + description: CPS network mask + oam_net_name: + type: string + description: OAM network name + attributes: + server_pcm_id: + type: string + description: the pcm nova service id + requirements: + - link_pcm_port_1: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + - local_storage_server_pcm: + capability: tosca.capabilities.Attachment + node: tosca.nodes.BlockStorage + relationship: tosca.relationships.AttachesTo + occurrences: + - 0 + - UNBOUNDED + - link_pcm_port_0: + capability: tosca.capabilities.network.Linkable + node: tosca.nodes.Root + relationship: tosca.relationships.network.LinksTo + occurrences: + - 1 + - 1 + capabilities: + endpoint_server_pcm: + type: tosca.capabilities.Endpoint.Admin + occurrences: + - 1 + - UNBOUNDED + os_server_pcm: + type: tosca.capabilities.OperatingSystem + occurrences: + - 1 + - UNBOUNDED + host_server_pcm: + type: tosca.capabilities.Container + valid_source_types: + - tosca.nodes.SoftwareComponent + occurrences: + - 1 + - UNBOUNDED + scalable_server_pcm: + type: tosca.capabilities.Scalable + occurrences: + - 1 + - UNBOUNDED + binding_server_pcm: + type: tosca.capabilities.network.Bindable + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_0: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED + attachment_pcm_port_1: + type: tosca.capabilities.Attachment + occurrences: + - 1 + - UNBOUNDED \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml new file mode 100644 index 0000000000..dcc2a9abbb --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/MainServiceTemplate.yaml @@ -0,0 +1,236 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: Main +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.compute: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + oam_net_ips: + label: OAM network ips + hidden: false + immutable: false + type: list + description: OAM network ips + default: + - 107.239.64.121 + entry_schema: + type: string + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + default: nova + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + default: 107.239.64.1 + pcm_server_names: + label: PCRF CM server names + hidden: false + immutable: false + type: list + description: name of the PCRF CM instance + default: + - ZRDM1PCRF01PCM001 + entry_schema: + type: string + pcm_image_name: + label: PCRF CM image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + default: rhel2 + cps_net_ips: + label: CPS network ips + hidden: false + immutable: false + type: list + description: CPS network ips + default: + - 172.26.16.113 + entry_schema: + type: string + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + default: nimbus_security_group + pcm_volumes: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: list + description: CPS Cluman Cinder Volume + default: + - 249cb355-8fdf-4382-9c3c-a2ebe767d45b + entry_schema: + type: string + compute_image_name: + hidden: false + immutable: false + type: string + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + default: cps + net_name: + hidden: false + immutable: false + type: string + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + default: int_pcrf_net_0 + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + default: 255.255.255.0 + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + default: 255.255.255.0 + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + default: oam_protected_net_0 + node_templates: + server_pcm_001: + type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + directives: + - substitutable + properties: + availabilityzone_name: + get_input: availabilityzone_name + oam_net_gw: + get_input: oam_net_gw + pcm_image_name: + get_input: pcm_image_name + security_group_name: + get_input: security_group_name + cps_net_ip: + get_input: + - cps_net_ips + - 0 + pcm_flavor_name: + get_input: pcm_flavor_name + service_template_filter: + substitute_service_template: nested-pcm_v0.1ServiceTemplate.yaml + pcm_vol: + get_input: + - pcm_volumes + - 0 + pcm_server_name: + get_input: + - pcm_server_names + - 0 + cps_net_name: + get_input: cps_net_name + cps_net_mask: + get_input: cps_net_mask + oam_net_ip: + get_input: + - oam_net_ips + - 0 + oam_net_mask: + get_input: oam_net_mask + oam_net_name: + get_input: oam_net_name + compute_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + network: + get_input: net_name + server_compute_get_attr_test: + type: org.openecomp.resource.vfc.nodes.heat.compute + properties: + flavor: + compute_flavor_name: null + image: + get_input: compute_image_name + config_drive: + get_attribute: + - compute_port_0 + - tenant_id + - port_security_enabled + - device_id + - qos_policy + - allowed_address_pairs + - show + - device_owner + - network + - security_groups + - fixed_ips + - mac_address + - admin_state_up + - name + - subnets + - status + user_data_format: + get_attribute: + - server_pcm_001 + - oam_net_gw + name: + compute_name: null + groups: + hot-nimbus-pcm_v0.4: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/hot-nimbus-pcm_v0.4.yaml + description: heat template that creates PCRF Cluman stack + members: + - server_pcm_001 + - compute_port_0 + - server_compute_get_attr_test \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml new file mode 100644 index 0000000000..1b03021742 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/expectedoutputfiles/nested-pcm_v0.1ServiceTemplate.yaml @@ -0,0 +1,207 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: nested-pcm_v0.1 +imports: + ContrailComputeGlobalTypes: + file: ContrailComputeGlobalTypesServiceTemplate.yaml + CinderVolumeGlobalTypes: + file: CinderVolumeGlobalTypesServiceTemplate.yaml + ContrailVirtualNetworkGlobalType: + file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml + AbstractSubstituteGlobalTypes: + file: AbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailPortGlobalTypes: + file: ContrailPortGlobalTypesServiceTemplate.yaml + GlobalSubstitutionTypes: + file: GlobalSubstitutionTypesServiceTemplate.yaml + NeutronPortGlobalTypes: + file: NeutronPortGlobalTypesServiceTemplate.yaml + NeutronNetGlobalTypes: + file: NeutronNetGlobalTypesServiceTemplate.yaml + CommonGlobalTypes: + file: CommonGlobalTypesServiceTemplate.yaml + ContrailAbstractSubstituteGlobalTypes: + file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml + ContrailNetworkRuleGlobalType: + file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml + NeutronSecurityRulesGlobalTypes: + file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml + NovaServerGlobalTypes: + file: NovaServerGlobalTypesServiceTemplate.yaml + ContrailV2VirtualMachineInterfaceGlobalType: + file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml +node_types: + org.openecomp.resource.vfc.nodes.heat.pcm_server: + derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server +topology_template: + inputs: + availabilityzone_name: + label: availabilityzone name + hidden: false + immutable: false + type: string + description: availabilityzone name + oam_net_gw: + label: CPS network gateway + hidden: false + immutable: false + type: string + description: CPS network gateway + pcm_image_name: + label: image name + hidden: false + immutable: false + type: string + description: PCRF CM image name + security_group_name: + label: security group name + hidden: false + immutable: false + type: string + description: the name of security group + cps_net_ip: + label: CPS network ip + hidden: false + immutable: false + type: string + description: CPS network ip + pcm_flavor_name: + label: PCRF CM flavor name + hidden: false + immutable: false + type: string + description: flavor name of PCRF CM instance + pcm_vol: + label: CPS Cluman Cinder Volume + hidden: false + immutable: false + type: string + description: CPS Cluman Cinder Volume + pcm_server_name: + label: PCRF CM server name + hidden: false + immutable: false + type: string + description: PCRF CM server name + cps_net_name: + label: CPS network name + hidden: false + immutable: false + type: string + description: CPS network name + cps_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_ip: + label: OAM network ip + hidden: false + immutable: false + type: string + description: OAM network ip + oam_net_mask: + label: CPS network mask + hidden: false + immutable: false + type: string + description: CPS network mask + oam_net_name: + label: OAM network name + hidden: false + immutable: false + type: string + description: OAM network name + node_templates: + pcm_port_1: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: oam_net_ip + network: + get_input: oam_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + server_pcm: + type: org.openecomp.resource.vfc.nodes.heat.pcm_server + properties: + flavor: + get_input: pcm_flavor_name + availability_zone: + get_input: availabilityzone_name + image: + get_input: pcm_image_name + config_drive: 'True' + user_data_format: RAW + name: + get_input: pcm_server_name + pcm_port_0: + type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port + properties: + security_groups: + - get_input: security_group_name + fixed_ips: + - ip_address: + get_input: cps_net_ip + network: + get_input: cps_net_name + requirements: + - binding: + capability: tosca.capabilities.network.Bindable + node: server_pcm + relationship: tosca.relationships.network.BindsTo + groups: + nested-pcm_v0.1: + type: org.openecomp.groups.heat.HeatStack + properties: + heat_file: ../Artifacts/nested-pcm_v0.1.yaml + description: heat template that creates PCRF Cluman stack + members: + - pcm_port_1 + - server_pcm + - pcm_port_0 + outputs: + server_pcm_id: + description: the pcm nova service id + value: server_pcm + substitution_mappings: + node_type: org.openecomp.resource.abstract.nodes.heat.nested-pcm_v0.1 + capabilities: + endpoint_server_pcm: + - server_pcm + - endpoint + os_server_pcm: + - server_pcm + - os + host_server_pcm: + - server_pcm + - host + scalable_server_pcm: + - server_pcm + - scalable + binding_server_pcm: + - server_pcm + - binding + attachment_pcm_port_0: + - pcm_port_0 + - attachment + attachment_pcm_port_1: + - pcm_port_1 + - attachment + requirements: + link_pcm_port_0: + - pcm_port_0 + - link + link_pcm_port_1: + - pcm_port_1 + - link + local_storage_server_pcm: + - server_pcm + - local_storage \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json new file mode 100644 index 0000000000..345ca77b2a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/MANIFEST.json @@ -0,0 +1,20 @@ +{ + "name": "vEP_JSA_Net", + "description": "Version 2.0 02-09-2016 (Authors: John Doe, user PROD)", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.yaml", + "type": "HEAT", + "data": [ + { + "file": "hot-nimbus-pcm_v0.4.env", + "type": "HEAT_ENV" + } + ] + },{ + "file": "nested-pcm_v0.1.yaml", + "type": "HEAT" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env new file mode 100644 index 0000000000..78cc03e2ea --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.env @@ -0,0 +1,14 @@ +parameters: + pcm_server_names: ZRDM1PCRF01PCM001 + pcm_image_name: rhel2 + pcm_flavor_name: cps + availabilityzone_name: nova + cps_net_name: int_pcrf_net_0 + cps_net_ips: 172.26.16.113 + cps_net_mask: 255.255.255.0 + oam_net_name: oam_protected_net_0 + oam_net_ips: 107.239.64.121 + oam_net_gw: 107.239.64.1 + oam_net_mask: 255.255.255.0 + pcm_volumes: 249cb355-8fdf-4382-9c3c-a2ebe767d45b + security_group_name: nimbus_security_group diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml new file mode 100644 index 0000000000..e4a79f34ba --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/hot-nimbus-pcm_v0.4.yaml @@ -0,0 +1,94 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_names: + type: comma_delimited_list + label: PCRF CM server names + description: name of the PCRF CM instance + pcm_image_name: + type: string + label: PCRF CM image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ips: + type: comma_delimited_list + label: OAM network ips + description: OAM network ips + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_volumes: + type: comma_delimited_list + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + compute_image_name: + type: string + net_name: + type: string + +resources: + server_pcm_001: + type: nested-pcm_v0.1.yaml + properties: + pcm_server_name: { get_param: [pcm_server_names, 0] } + pcm_image_name: { get_param: pcm_image_name } + pcm_flavor_name: { get_param: pcm_flavor_name } + availabilityzone_name: { get_param: availabilityzone_name } + security_group_name: { get_param: security_group_name } + pcm_vol: { get_param: [pcm_volumes, 0] } + cps_net_name: { get_param: cps_net_name } + cps_net_ip: { get_param: [cps_net_ips, 0] } + cps_net_mask: { get_param: cps_net_mask } + oam_net_name: { get_param: oam_net_name } + oam_net_ip: { get_param: [oam_net_ips, 0] } + oam_net_mask: { get_param: oam_net_mask } + oam_net_gw: { get_param: oam_net_gw } + + server_compute_get_attr_test: + type: OS::Nova::Server + properties: + config_drive: {get_attr: [compute_port_0]} + name: { compute_name } + image: { get_param: compute_image_name } + flavor: { compute_flavor_name } + user_data_format: { get_attr: [server_pcm_001 , oam_net_gw] } + user_data: { get_attr: [server_pcm_001]} + + compute_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: net_name } \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml new file mode 100644 index 0000000000..4e12676aa8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/resources/mock/heat/nested/single/inputs/nested-pcm_v0.1.yaml @@ -0,0 +1,114 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Cluman stack + +parameters: + pcm_server_name: + type: string + label: PCRF CM server name + description: PCRF CM server name + pcm_image_name: + type: string + label: image name + description: PCRF CM image name + pcm_flavor_name: + type: string + label: PCRF CM flavor name + description: flavor name of PCRF CM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + cps_net_name: + type: string + label: CPS network name + description: CPS network name + cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + oam_net_name: + type: string + label: OAM network name + description: OAM network name + oam_net_ip: + type: string + label: OAM network ip + description: OAM network ip + oam_net_gw: + type: string + label: CPS network gateway + description: CPS network gateway + oam_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcm_vol: + type: string + label: CPS Cluman Cinder Volume + description: CPS Cluman Cinder Volume + security_group_name: + type: string + label: security group name + description: the name of security group + +resources: + network: + type: net + script_init: + type: OS:INIT + server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + server_pcm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcm_server_name } + image: { get_param: pcm_image_name } + flavor: { get_param: pcm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: pcm_port_0} + - port: { get_resource: pcm_port_1} + block_device_mapping: + - device_name: vdb + volume_id: { get_param: pcm_vol} + user_data_format: RAW + user_data: + get_resource: server_init + + pcm_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: cps_net_name } + fixed_ips: + - ip_address: { get_param: cps_net_ip } + security_groups: [{ get_param: security_group_name }] + + pcm_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: oam_net_name } + fixed_ips: + - ip_address: { get_param: oam_net_ip } + security_groups: [{ get_param: security_group_name }] + + #pcm_vol_attachment: + # type: OS::Cinder::VolumeAttachment + # properties: + # volume_id: { get_param: pcm_vol } + # mountpoint: /dev/vdb + # instance_uuid: { get_resource: server_pcm } +outputs: + server_pcm_id: + description: the pcm nova service id + value: { get_resource: server_pcm } \ No newline at end of file -- cgit 1.2.3-korg