From c3ef82f489b915095b7464fb119daf43b84f67f8 Mon Sep 17 00:00:00 2001 From: Julien Fontaine Date: Wed, 4 Aug 2021 15:52:02 -0400 Subject: [TEST] Added support for multi-vnf macro instantiation Decoupled service YAML template into a model YAML template and a (SO) service YAML template. Model YAML template will be used during the onboarding steps and service YAML template will be used to generate payload when sending instantiation request to SO. Service YAML template reference model name to use for its VNF/VF-Modules using "model_name" field. This provide more flexibility to design the testcase and enables to setup more complex testcases like instantiating several VNF/VF-MOdules using the same SDC model infos. This patch aims to provide backward compatibility for existing testcases based on YAML template. Issue-ID: TEST-358 Signed-off-by: Julien Fontaine Change-Id: I69d370eff4d383d5af135206476c65e4a56e4ee5 --- .../vnf-services/multi-vnf-ubuntu-model.yaml.j2 | 16 ++++++++++ .../vnf-services/multi-vnf-ubuntu-service.yaml.j2 | 35 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/onaptests/templates/vnf-services/multi-vnf-ubuntu-model.yaml.j2 create mode 100644 src/onaptests/templates/vnf-services/multi-vnf-ubuntu-service.yaml.j2 (limited to 'src/onaptests/templates') diff --git a/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-model.yaml.j2 b/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-model.yaml.j2 new file mode 100644 index 0000000..96037c9 --- /dev/null +++ b/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-model.yaml.j2 @@ -0,0 +1,16 @@ +--- +{{ service_name }}: + instantiation_type: "Macro" + vnfs: + - vnf_name: {{ service_name }}VF0 + properties: + controller_actor: "CDS" + skip_post_instantiation_configuration: False + sdnc_artifact_name: "UbuntuVNF" + sdnc_model_version: "1.0.0" + sdnc_model_name: "UbuntuVNF" + vnf_artifact_type: "CONTROLLER_BLUEPRINT_ARCHIVE" + vnf_artifact_name: "UBUNTUVNF_enriched.zip" + vnf_artifact_label: "UbuntuVNF" + vnf_artifact_file_path: "/tmp/UBUNTUVNF_enriched.zip" + heat_files_to_upload: onaptests/templates/heat-files/nso_ubuntu/nso_ubuntu.zip diff --git a/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-service.yaml.j2 b/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-service.yaml.j2 new file mode 100644 index 0000000..9403a7d --- /dev/null +++ b/src/onaptests/templates/vnf-services/multi-vnf-ubuntu-service.yaml.j2 @@ -0,0 +1,35 @@ +--- +{{ service_name }}: + subscription_service_type: {{ service_name }} + vnfs: + - model_name: {{ service_name }}VF0 + vnf_name: {{ service_name }}00 + parameters: + vnf-name: "multi_vnf_ubuntu_0_0" + vnf_name: "MultiVnfUbuntu00" + vf_modules: + - vf_module_name: {{ service_name }}00network0 + model_name: base + parameters: + name: "multi_vnf_ubuntu_0_0_network_0" + cidr: "10.10.10.0/24" + - model_name: {{ service_name }}VF0 + vnf_name: {{ service_name }}01 + parameters: + vnf-name: "multi_vnf_ubuntu_0_1" + vnf_name: "MultiVnfUbuntu01" + vf_modules: + - vf_module_name: {{ service_name }}01vfm0 + model_name: ubuntu-vf-module + parameters: + name: "multi_vnf_ubuntu_0_1_vfm_0" + network_mgmt: "vlan197_net" + key_name: "sebastien" + network_name: "multi_vnf_ubuntu_0_0_network_0" + - vf_module_name: {{ service_name }}01vfm1 + model_name: ubuntu-vf-module + parameters: + name: "multi_vnf_ubuntu_0_1_vfm_1" + network_mgmt: "vlan197_net" + key_name: "sebastien" + network_name: "multi_vnf_ubuntu_0_0_network_0" -- cgit 1.2.3-korg