From ce16741b481dbaae3a3447f84efb2b4ce5dffc82 Mon Sep 17 00:00:00 2001 From: Denes Nemeth Date: Wed, 30 May 2018 22:07:40 +0200 Subject: Fix template generator for R2 Change-Id: Ib686f1d29b659b64cb30f702c62ffd0ca4cd3f8b Signed-off-by: Denes Nemeth Issue-ID: VFC-728 --- .../packageconverter/empty.vnfd.cbam.yaml | 8 +- .../packageconverter/empty.vnfd.onap.v2.yaml | 21 ++++ .../packageconverter/nodes.vnfd.cbam.yaml | 25 +++- .../packageconverter/nodes.vnfd.onap.v2.yaml | 133 +++++++++++++++++++++ 4 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.v2.yaml create mode 100644 nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.v2.yaml (limited to 'nokiav2/driver/src/test/resources/unittests') diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml index 45bfb73f..e80e9141 100644 --- a/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml +++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.cbam.yaml @@ -4,8 +4,14 @@ topology_template: substitution_mappings: node_type: tosca.nodes.nfv.VNF properties: + descriptor_id: myId descriptor_version: '1.0' provider: myProvider product_name: 'myName' software_version: '2.0' - product_info_name: product_info_name \ No newline at end of file + product_info_name: product_info_name + capabilities: + deployment_flavour: + properties: + flavour_id: myFlavorId + description: myFlavorDescription \ No newline at end of file diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.v2.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.v2.yaml new file mode 100644 index 00000000..7d48b7ad --- /dev/null +++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/empty.vnfd.onap.v2.yaml @@ -0,0 +1,21 @@ +tosca_definitions_version: tosca_simple_profile_yaml_1_1 + +topology_template: + inputs: + etsi_config: + type: string + description: The ETSI configuration + node_templates: + VNF: + type: tosca.nodes.nfv.VNF + properties: + descriptor_id: myId + descriptor_version: 1.0 + provider: myProvider + product_name: myName + software_version: 2.0 + product_info_name: product_info_name + vnfm_info: [ NokiaSVNFM ] + flavour_id: myFlavorId + flavour_description: myFlavorDescription + requirements: diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml index 985ab276..3870605f 100644 --- a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml +++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.cbam.yaml @@ -4,11 +4,22 @@ topology_template: substitution_mappings: node_type: tosca.nodes.nfv.VNF properties: + descriptor_id: Nokia~Maria DB~1.0~1.0 descriptor_version: '1.0' provider: myProvider product_name: 'myName' software_version: '2.0' product_info_name: product_info_name + product_info_description: Relational database, non-scalable + capabilities: + deployment_flavour: + properties: + flavour_id: scalableRouted + description: flavorDescription + vdu_profile: + vduNode: + min_number_of_instances: 3 + max_number_of_instances: 11 node_templates: vduNode: type: tosca.nodes.nfv.VDU @@ -35,19 +46,29 @@ topology_template: type: tosca.nodes.nfv.VirtualStorage properties: id: myStorage1 - size_of_storage: 1G + size_of_storage: 1 GB myStorage2: type: tosca.nodes.nfv.VirtualStorage properties: id: myStorage2 - size_of_storage: 2G + size_of_storage: 2 GB myNetwork1: type: tosca.nodes.nfv.VL + properties: + connectivity_type: + layer_protocol: ipv4 + flow_pattern: mesh + description: myDescription myNetwork2: type: tosca.nodes.nfv.VL + properties: + connectivity_type: + layer_protocol: ipv4 + flow_pattern: mesh + description: myDescription icpWithOutEcp: type: tosca.nodes.nfv.ICP diff --git a/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.v2.yaml b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.v2.yaml new file mode 100644 index 00000000..fe0ccf4c --- /dev/null +++ b/nokiav2/driver/src/test/resources/unittests/packageconverter/nodes.vnfd.onap.v2.yaml @@ -0,0 +1,133 @@ +tosca_definitions_version: tosca_simple_profile_yaml_1_1 + +topology_template: + inputs: + etsi_config: + type: string + description: The ETSI configuration + node_templates: + VNF: + type: tosca.nodes.nfv.VNF + properties: + descriptor_id: Nokia~Maria DB~1.0~1.0 + descriptor_version: 1.0 + provider: myProvider + product_name: myName + software_version: 2.0 + product_info_name: product_info_name + product_info_description: Relational database, non-scalable + vnfm_info: [ NokiaSVNFM ] + flavour_id: scalableRouted + flavour_description: flavorDescription + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + node: myNetwork2 + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + node: myNetwork1 + vduNode: + type: tosca.nodes.nfv.Vdu.Compute + properties: + name: vduNode + description: myVduDesc + configurable_properties: + vdu_profile: + min_number_of_instances: 3 + max_number_of_instances: 11 + capabilities: + virtual_compute: + properties: + virtual_memory: + virtual_mem_size: 8192 MB + virtual_cpu: + num_virtual_cpu: 4 + requirements: + - virtual_storage: + capability: tosca.capabilities.nfv.VirtualStorage + node: myStorage1 + - virtual_storage: + capability: tosca.capabilities.nfv.VirtualStorage + node: myStorage2 + myStorage1: + type: tosca.nodes.nfv.Vdu.VirtualStorage + properties: + type_of_storage: volume + size_of_storage: 1 GB + myStorage2: + type: tosca.nodes.nfv.Vdu.VirtualStorage + properties: + type_of_storage: volume + size_of_storage: 2 GB + myNetwork1: + type: tosca.nodes.nfv.VnfVirtualLink + properties: + connectivity_type: + layer_protocol: [ ipv4 ] + flow_pattern: mesh + vl_profile: + max_bit_rate_requirements: + root: 2147483647 + leaf: 2147483647 + min_bit_rate_requirements: + root: 0 + leaf: 0 + myNetwork2: + type: tosca.nodes.nfv.VnfVirtualLink + properties: + connectivity_type: + layer_protocol: [ ipv4 ] + flow_pattern: mesh + vl_profile: + max_bit_rate_requirements: + root: 2147483647 + leaf: 2147483647 + min_bit_rate_requirements: + root: 0 + leaf: 0 + icpWithOutEcp: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocol: [ ipv4 ] + description: myDescription + protocol_data: [] + trunk_mode: false + requirements: + - virtual_binding: vduNode + - virtual_link: myNetwork1 + icpWithEcp: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocol: [ ipv4 ] + description: myDescription + protocol_data: [] + trunk_mode: false + requirements: + - virtual_binding: vduNode + - virtual_link: myNetwork1 + icpWithOutDescription: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocol: [ ipv4 ] + protocol_data: [] + trunk_mode: false + requirements: + - virtual_binding: vduNode + - virtual_link: myNetwork1 + myEcp: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocol: [ ipv4 ] + protocol_data: [ ] + trunk_mode: false + description: myDescription + requirements: + - virtual_binding: vduNode + myEcpWithDescription: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocol: [ ipv4 ] + protocol_data: [ ] + trunk_mode: false + requirements: + - virtual_binding: vduNode -- cgit 1.2.3-korg