aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2019-08-29 16:31:53 +0000
committerOfir Sonsino <ofir.sonsino@intl.att.com>2019-09-01 08:42:24 +0000
commit96908856dea9061161b2c324aa7b0eeb5d6e4fd5 (patch)
tree9faa162c2b55e78506a1fe4cf87ff1be8b6501bb /openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources
parentc1e9e72d0689f1188daf0c105e035bd16a0818f8 (diff)
Fix artifacts references in main TOSCA descriptor
During package conversion, artifacts can have their path changed. References for those artifacts inside the main TOSCA descriptor must be updated accordingly. Change-Id: Idcffb0724c20875ff1decebfec7c47605bfe20dc Issue-ID: SDC-2540 Signed-off-by: andre.schmid <andre.schmid@est.tech>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources')
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/nonManoConfig.yaml5
-rw-r--r--openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/vnfPackage/vnf1/Definitions/MainServiceTemplate.yaml97
2 files changed, 101 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/nonManoConfig.yaml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/nonManoConfig.yaml
index 32c6b1ce57..914e9ff59d 100644
--- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/nonManoConfig.yaml
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/nonManoConfig.yaml
@@ -4,4 +4,7 @@ nonManoKeyFolderMapping:
type: Deployment
Other:
location: VES_EVENTS
- type: Informational \ No newline at end of file
+ type: Informational
+ onap_other:
+ location: OTHER
+ type: Deployment \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/vnfPackage/vnf1/Definitions/MainServiceTemplate.yaml b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/vnfPackage/vnf1/Definitions/MainServiceTemplate.yaml
new file mode 100644
index 0000000000..3ed5f5ce00
--- /dev/null
+++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/test/resources/vnfPackage/vnf1/Definitions/MainServiceTemplate.yaml
@@ -0,0 +1,97 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+metadata:
+ VNFD_SCHEMA_VERSION: 2.5.1+1
+ template_name: Main
+ template_version: '1.0'
+ template_author: onap
+topology_template:
+ node_templates:
+ VDU_vgw_0:
+ type: tosca.nodes.nfv.Vdu.Compute
+ properties:
+ name:
+ get_input: vgw_name_0
+ description: vgw
+ vdu_profile:
+ min_number_of_instances: 1
+ max_number_of_instances: 1
+ watchdog: none
+ inject_files:
+ source_path: ../Artifacts/Deployment/ANOTHER/authorized_keys
+ dest_path: /home/ubuntu/.ssh/authorized_keys
+ meta_data:
+ vnf_id:
+ get_input: vnf_id
+ vf_module_id:
+ get_input: vf_module_id
+ mux_gw_private_net_ipaddr:
+ get_input: vgw_private_ip_0
+ oam_ipaddr:
+ get_input: vgw_private_ip_1
+ oam_cidr:
+ get_input: onap_private_net_cidr
+ cpe_public_net_cidr:
+ get_input: cpe_public_net_cidr
+ mux_gw_private_net_cidr:
+ get_input: mux_gw_private_net_cidr
+ mux_ip_addr:
+ get_input: mux_ip_addr
+ vg_vgmux_tunnel_vni:
+ get_input: vg_vgmux_tunnel_vni
+ install_script_version:
+ get_input: install_script_version
+ cloud_env:
+ get_input: cloud_env
+ nexus_artifact_repo:
+ get_input: nexus_artifact_repo
+ boot_data: |
+ #!/bin/bash
+ METADATA=`curl -s http://169.254.169.254/openstack/2012-08-10/meta_data.json`
+ apt-get -y install jq
+
+ get_metadata () {
+ echo $METADATA | jq -r ".meta.$1"
+ }
+
+ # Create configuration files
+ mkdir /opt/config
+ echo "$(get_metadata oam_ipaddr)" > /opt/config/oam_ipaddr.txt
+ echo "$(get_metadata oam_cidr)" > /opt/config/oam_cidr.txt
+ echo "$(get_metadata cpe_public_net_cidr)" > /opt/config/cpe_public_net_cidr.txt
+ echo "$(get_metadata mux_gw_private_net_ipaddr)" > /opt/config/mux_gw_private_net_ipaddr.txt
+ echo "$(get_metadata mux_gw_private_net_cidr)" > /opt/config/mux_gw_private_net_cidr.txt
+ echo "$(get_metadata install_script_version)" > /opt/config/install_script_version.txt
+ echo "$(get_metadata cloud_env)" > /opt/config/cloud_env.txt
+ echo "$(get_metadata mux_ip_addr)" > /opt/config/mux_ip_addr.txt
+ echo "$(get_metadata vg_vgmux_tunnel_vni)" > /opt/config/vg_vgmux_tunnel_vni.txt
+ echo "$(get_metadata nexus_artifact_repo)" > /opt/config/nexus_artifact_repo.txt
+
+ # Download and run install script
+ apt-get -y install unzip
+ INSTALL_SCRIPT_VERSION=$(get_metadata install_script_version)
+ NEXUS_ARTIFACT_REPO=$(get_metadata nexus_artifact_repo)
+ if [[ "${INSTALL_SCRIPT_VERSION}" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
+ curl -k -L "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=vcpe-scripts&e=zip&v=${INSTALL_SCRIPT_VERSION}" -o /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip
+ unzip -j /opt/vcpe-scripts-${INSTALL_SCRIPT_VERSION}.zip -d /opt v_gw_install.sh
+ cd /opt
+ chmod +x v_gw_install.sh
+ ./v_gw_install.sh
+ capabilities:
+ virtual_compute:
+ properties:
+ virtual_memory:
+ virtual_mem_size: 4096 MB
+ vdu_mem_requirements:
+ memoryPageSize: '{"schemaVersion": "0", "schemaSelector": "", "hardwarePlatform":
+ "generic", "mandatory": "true", "configurationValue": "2 MB"}'
+ numberOfPages: '{"schemaVersion": "0","schemaSelector": "","hardwarePlatform":
+ "generic","mandatory": "true", "configurationValue": "1024"}'
+ virtual_cpu:
+ num_virtual_cpu: 2
+ cpu_architecture: generic
+ virtual_local_storage:
+ - size_of_storage: 40 GB
+ artifacts:
+ sw_image:
+ type: tosca.artifacts.nfv.SwImage
+ file: ../Artifacts/Deployment/ANOTHER/image \ No newline at end of file