From 684ad537becece9df772b04d0d8226bcb7c30ca4 Mon Sep 17 00:00:00 2001 From: "stark, steven" Date: Fri, 19 Apr 2019 16:17:58 -0700 Subject: [VVP] updating nested parameter test R-708564 was updated in RTD to target explicit parameters Change-Id: If860903ae13b76543c43f3e805b8aa03e9e2019d Issue-ID: VVP-197 Signed-off-by: stark, steven --- .../test_nested_parameters/fail/base_stark.env | 16 ++ .../test_nested_parameters/fail/base_stark.yaml | 139 ++++++++++++++++ .../test_nested_parameters/fail/heat_template.yaml | 89 ----------- .../fail/nested_template_bad.yaml | 70 --------- .../test_nested_parameters/fail/stark_nested.yaml | 175 +++++++++++++++++++++ .../test_nested_parameters/pass/base_stark.env | 16 ++ .../test_nested_parameters/pass/base_stark.yaml | 134 ++++++++++++++++ .../pass/base_stark_nested_volume.yaml | 49 ++++++ .../pass/base_stark_volume.env | 4 + .../pass/base_stark_volume.yaml | 51 ++++++ .../test_nested_parameters/pass/heat_template.yaml | 64 -------- .../pass/nested_template_1.yaml | 61 ------- .../pass/nested_template_good.yaml | 61 ------- .../test_nested_parameters/pass/stark_nested.yaml | 170 ++++++++++++++++++++ 14 files changed, 754 insertions(+), 345 deletions(-) create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.env create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.yaml delete mode 100644 ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml delete mode 100644 ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/fail/stark_nested.yaml create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.env create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.yaml create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_nested_volume.yaml create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.env create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.yaml delete mode 100644 ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml delete mode 100644 ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml delete mode 100644 ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml create mode 100755 ice_validator/tests/fixtures/test_nested_parameters/pass/stark_nested.yaml (limited to 'ice_validator/tests/fixtures') diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.env b/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.env new file mode 100755 index 0000000..ae1e68b --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.env @@ -0,0 +1,16 @@ +parameters: + flavor: "ns.c2r2d30.n1" + starkimage_name: "Ubuntu 14.04 for KVM VMs with ATT Supported Tools - NO PP" + vm_role: "vm_role" + stark_count: 3 + starkint_mummy_ips: [0.0.0.0] + #dummy_net_id: + #dummy_subnet_id: + #environment_context: + #stark_dummy_ips: + #stark_names: + #vf_module_id: + #vf_module_name: + #vnf_id: + #vnf_name: + #workload_context: diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.yaml new file mode 100755 index 0000000..dfe53b3 --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/base_stark.yaml @@ -0,0 +1,139 @@ +heat_template_version: 2015-04-30 + +description: | + this is a test template + +parameters: + + stark_volumes: + description: nfsadnfkl + type: json + + vnfname: + label: VNF name + description: this name will also be used on VM server and other resources. + type: string + + vnfid: + label: VNF ID + description: 'This ID will be passed as metadata on all Nova Servers, Cinder Volumes, and any other resource that supports metadata' + type: string + + vfmodule_id: + type: string + description: Unique ID for this VF Module instance + + vfmodule_index: + type: string + description: Unique ID for this VF Module instance + + vfmodule_name: + type: string + description: Unique name for this VF Module instance + + vmrole: + type: string + description: role tagged to VM + + flavor: + label: VMs flavor + description: The JSON map containing the nova Flavors to be used for the VM Servers + type: string + + starkimage_name: + type: string + description: "stark image name" + + names: + type: comma_delimited_list + description: VM name for STARK VM 1 + + workloadcontext: + type: string + description: Workload Context for this VNF instance + + environmentcontext: + type: string + description: Environment Context for this VNF instance + + dummynet_id: + type: string + description: nsdaljfnsak + + dummysubnet_id: + type: string + description: nsdaljfnsak + + iplist: + type: comma_delimited_list + description: dsnafljsadnlfks + + stark_count: + type: number + description: njsdlf + + starkdummy_floating_ip: + type: string + description: nfalsd + + starkint_mummy_ips: + type: comma_delimited_list + description: nfdsa + + oamnet_fqdn: + type: string + description: ndfsakl + + oam2net_fqdn: + type: string + description: nfkldas + + instanceip_address: + type: string + description: nfsakdl + + my_contrailip: + type: string + description: nlfdsa + +resources: + + int_mummy_network: + type: OS::Neutron::Net + + int_mummy_subnet: + type: OS::Neutron::Subnet + properties: + network: { get_resource: int_mummy_network } + + stark_RG: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: stark_count } + resource_def: + type: stark_nested.yaml + properties: + index: '%index%' + dummy_net_id: { get_param: dummynet_id } + dummy_subnet_id: { get_param: dummysubnet_id } + stark_dummy_ips: { get_param: iplist } + vnf_name: { get_param: vnfname } + vnf_id: { get_param: vnfid } + vf_module_id: { get_param: vfmodule_id } + vf_module_index: { get_param: vfmodule_index } + vf_module_name: { get_param: vfmodule_name } + vm_role: { get_param: vmrole } + stark_flavor_name: { get_param: flavor } + stark_image_name: { get_param: starkimage_name } + stark_names: { get_param: names } + workload_context: { get_param: workloadcontext } + environment_context: { get_param: environmentcontext } + stark_volumes: { get_param: stark_volumes } + stark_dummy_floating_ip: { get_param: starkdummy_floating_ip } + int_mummy_net_id: { get_resource: int_mummy_network } + int_mummy_subnet_id: { get_resource: int_mummy_subnet } + stark_int_mummy_ips: { get_param: starkint_mummy_ips } + oam_net_fqdn: { get_param: oamnet_fqdn } + oam2_net_fqdn: { get_param: oam2net_fqdn } + instance_ip_address: { get_param: instanceip_address } + mycontrailip: { get_param: my_contrailip } diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml deleted file mode 100644 index db70d14..0000000 --- a/ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# -*- coding: utf8 -*- -# ============LICENSE_START==================================================== -# org.onap.vvp/validation-scripts -# =================================================================== -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# -# Unless otherwise specified, all software contained herein is licensed -# under the Apache License, Version 2.0 (the "License"); -# you may not use this software except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# -# Unless otherwise specified, all documentation contained herein is licensed -# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); -# you may not use this documentation except in compliance with the License. -# You may obtain a copy of the License at -# -# https://creativecommons.org/licenses/by/4.0/ -# -# Unless required by applicable law or agreed to in writing, documentation -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ============LICENSE_END============================================ -# -# - -# VERSION = '1.0.0' - ---- -description: base - -parameters: - vm_type_volume_name_0: - type: string - vm_type_volume_size_0: - type: number - vm_role: - type: string - vnf_id: - type: string - vf_module_id: - type: string - vnf_name: - type: string - vf_module_name: - type: string - vf_module_index: - type: string - environment_context: - type: string - workload_context: - type: string - -resources: - server_0: - type: nested_template_1.yaml - properties: - name: { get_param: server_name_0 } - vm_1role: { get_param: vm_role } - vnf_1id: { get_param: vnf_id } - vf_module_1id: { get_param: vf_module_id } - vnf_1name: { get_param: vnf_name } - vf_module_1name: { get_param: vf_module_name } - vf_module_1index: { get_param: vf_module_index } - environment_cont1ext: { get_param: environment_context } - workload_cont1ext: { get_param: workload_context } - - my_resource_group_1: - type: OS::Heat::ResourceGroup - properties: - count: 5 - resource_def: { type: nested_template_bad.yaml } - -outputs: - vm_type_volume_id_0: - value: {get_resource: vm_type_volume_0} diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml deleted file mode 100644 index 068afb8..0000000 --- a/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# -*- coding: utf8 -*- -# ============LICENSE_START==================================================== -# org.onap.vvp/validation-scripts -# =================================================================== -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# -# Unless otherwise specified, all software contained herein is licensed -# under the Apache License, Version 2.0 (the "License"); -# you may not use this software except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# -# Unless otherwise specified, all documentation contained herein is licensed -# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); -# you may not use this documentation except in compliance with the License. -# You may obtain a copy of the License at -# -# https://creativecommons.org/licenses/by/4.0/ -# -# Unless required by applicable law or agreed to in writing, documentation -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ============LICENSE_END============================================ -# -# - -# VERSION = '1.0.0' - ---- -heat_template_version: 2013-05-23 - -resources: - volume: - type: OS::Cinder::Volume - properties: - size: 1 - - volume_attachment: - type: OS::Cinder::VolumeAttachment - properties: - volume_id: { get_resource: volume } - instance_uuid: { get_resource: instance } - - instance: - type: OS::Nova::Server - properties: - image: myimage - flavor: m1.small - -parameters: - admin_volume_size_0: - type: number - description: Size of the volume to be created. - constraints: - - range: { min: 1, max: 1024 } - description: nested templates MAY NOT have constraints. - diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/stark_nested.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/stark_nested.yaml new file mode 100755 index 0000000..e6b328a --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/stark_nested.yaml @@ -0,0 +1,175 @@ +heat_template_version: 2015-04-30 + +description: | + stark nested template + +parameters: + + stark_volumes: + type: comma_delimited_list + description: ndjsfka + + index: + type: number + description: nsadlf + + dummy_net_id: + type: string + description: nsdaljfnsak + + dummy_subnet_id: + type: string + description: nsdaljfnsak + + stark_dummy_ips: + type: comma_delimited_list + description: dsnafljsadnlfks + + vnf_name: + label: VNF name + description: this name will also be used on VM server and other resources. + type: string + + vnf_id: + label: VNF ID + description: 'This ID will be passed as metadata on all Nova Servers, Cinder Volumes, and any other resource that supports metadata' + type: string + + vf_module_id: + type: string + description: Unique ID for this VF Module instance + + vf_module_index: + type: string + description: Unique ID for this VF Module instance + + vf_module_name: + type: string + description: Unique name for this VF Module instance + + vm_role: + type: string + description: role tagged to VM + + stark_flavor_name: + label: VMs flavor + description: The JSON map containing the nova Flavors to be used for the VM Servers + type: string + + stark_image_name: + type: string + description: "stark image name" + + stark_names: + type: comma_delimited_list + description: VM name for stark VM 1 + + workload_context: + type: string + description: Workload Context for this VNF instance + + environment_context: + type: string + description: Environment Context for this VNF instance + + stark_dummy_floating_ip: + type: string + description: Test floating IP test + + int_mummy_net_id: + type: string + description: Test floating IP test + + int_mummy_subnet_id: + type: string + description: Test floating IP test + + stark_int_mummy_ips: + type: comma_delimited_list + description: Test floating IP test + + oam_net_fqdn: + type: string + description: nsdaklfnsaklfsdl + + oam2_net_fqdn: + type: string + description: ndjfls + + instance_ip_address: + type: string + description: nsdlfkn + + mycontrailip: + type: string + description: njsaf + +resources: + + fw_0_oam_protected_vmi_0_IP_0: + type: OS::ContrailV2::InstanceIp + properties: + instance_ip_address: { get_param: instance_ip_address } + + fw_0_oam_vmi_0: + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_network_refs: + - get_param: oam_net_fqdn + - get_param: oam2_net_fqdn + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: + [{ + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: mycontrailip }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: "fasdfas", + }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: "test123", + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: "asdfasdf", + }], + } + + stark_0_dummy_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: dummy_net_id } + fixed_ips: + - subnet: { get_param: dummy_subnet_id } + ip_address: { get_param: [stark_dummy_ips, { get_param: index }] } + allowed_address_pairs: + - ip_address: { get_param: stark_dummy_floating_ip } + + stark_0_int_mummy_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_mummy_net_id } + fixed_ips: + - subnet: { get_param: int_mummy_subnet_id } + ip_address: { get_param: [stark_int_mummy_ips, { get_param: index }] } + + stark_server_0: + type: OS::Nova::Server + properties: + name: { get_param: [stark_names, { get_param: index }] } + image: { get_param: stark_image_name} + flavor: { get_param: stark_flavor_name } + networks: + - port: { get_resource: stark_0_dummy_port_0 } + - port: { get_resource: stark_0_int_mummy_port_0 } + metadata: + vnf_id: {get_param: vnf_id} + vnf_name: {get_param: vnf_name} + vf_module_id: {get_param: vf_module_id} + vf_module_index: {get_param: vf_module_index} + vf_module_name: {get_param: vf_module_name} + vm_role: {get_param: vm_role} + workload_context: {get_param: workload_context } + environment_context: {get_param: environment_context } + + stark_volume_attachment_0: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: {get_resource: stark_server_0 } + volume_id: {get_param: [stark_volumes, { get_param: index }] } diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.env b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.env new file mode 100755 index 0000000..f3868fd --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.env @@ -0,0 +1,16 @@ +parameters: + stark_flavor_name: "ns.c2r2d30.n1" + stark_image_name: "Ubuntu 14.04 for KVM VMs with ATT Supported Tools - NO PP" + vm_role: "vm_role" + stark_count: 3 + stark_int_mummy_ips: [0.0.0.0] + #dummy_net_id: + #dummy_subnet_id: + #environment_context: + #stark_dummy_ips: + #stark_names: + #vf_module_id: + #vf_module_name: + #vnf_id: + #vnf_name: + #workload_context: diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.yaml new file mode 100755 index 0000000..0f82c0b --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark.yaml @@ -0,0 +1,134 @@ +heat_template_version: 2015-04-30 + +description: | + this is a test template + +parameters: + + stark_volumes: + description: nfsadnfkl + type: json + + vnf_name: + label: VNF name + description: this name will also be used on VM server and other resources. + type: string + + vnf_id: + label: VNF ID + description: 'This ID will be passed as metadata on all Nova Servers, Cinder Volumes, and any other resource that supports metadata' + type: string + + vf_module_id: + type: string + description: Unique ID for this VF Module instance + + vf_module_name: + type: string + description: Unique name for this VF Module instance + + vm_role: + type: string + description: role tagged to VM + + stark_flavor_name: + label: VMs flavor + description: The JSON map containing the nova Flavors to be used for the VM Servers + type: string + + stark_image_name: + type: string + description: "stark image name" + + stark_names: + type: comma_delimited_list + description: VM name for STARK VM 1 + + workload_context: + type: string + description: Workload Context for this VNF instance + + environment_context: + type: string + description: Environment Context for this VNF instance + + dummy_net_id: + type: string + description: nsdaljfnsak + + dummy_subnet_id: + type: string + description: nsdaljfnsak + + stark_dummy_ips: + type: comma_delimited_list + description: dsnafljsadnlfks + + stark_count: + type: number + description: njsdlf + + stark_dummy_floating_ip: + type: string + description: nfalsd + + stark_int_mummy_ips: + type: comma_delimited_list + description: nfdsa + + oam_net_fqdn: + type: string + description: ndfsakl + + oam2_net_fqdn: + type: string + description: nfkldas + + instance_ip_address: + type: string + description: nfsakdl + + mycontrailip: + type: string + description: nlfdsa + +resources: + + int_mummy_network: + type: OS::Neutron::Net + + int_mummy_subnet: + type: OS::Neutron::Subnet + properties: + network: { get_resource: int_mummy_network } + + stark_RG: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: stark_count } + resource_def: + type: stark_nested.yaml + properties: + index: '%index%' + dummy_net_id: { get_param: dummy_net_id } + dummy_subnet_id: { get_param: dummy_subnet_id } + stark_dummy_ips: { get_param: stark_dummy_ips } + vnf_name: { get_param: vnf_name } + vnf_id: { get_param: vnf_id } + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + vm_role: { get_param: vm_role } + stark_flavor_name: { get_param: stark_flavor_name } + stark_image_name: { get_param: stark_image_name } + stark_names: { get_param: stark_names } + workload_context: { get_param: workload_context } + environment_context: { get_param: environment_context } + stark_volumes: { get_param: stark_volumes } + stark_dummy_floating_ip: { get_param: stark_dummy_floating_ip } + int_mummy_net_id: { get_resource: int_mummy_network } + int_mummy_subnet_id: { get_resource: int_mummy_subnet } + stark_int_mummy_ips: { get_param: stark_int_mummy_ips } + oam_net_fqdn: { get_param: oam_net_fqdn } + oam2_net_fqdn: { get_param: oam2_net_fqdn } + instance_ip_address: { get_param: instance_ip_address } + mycontrailip: { get_param: mycontrailip } diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_nested_volume.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_nested_volume.yaml new file mode 100755 index 0000000..23a23fe --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_nested_volume.yaml @@ -0,0 +1,49 @@ +heat_template_version: 2014-10-16 + +description: > + this is a test + +parameters: + + vnf_name: + type: string + label: VF name + description: Unique name for this VF instance. + + vf_module_id: + type: string + label: VF module id + description: VF module id + + vf_module_name: + type: string + label: VF module name + description: Unique name for this VF module instance. + + stark_volume_size: + type: number + label: stark cinder volume size + description: Size of the Cinder volume. Measured in gigabytes. + +resources: + + stark_volume_0: + type: OS::Cinder::Volume + properties: + name: + str_replace: + template: VNF_NAME_volume_0 + params: + VNF_NAME: {get_param: vnf_name} + metadata: + vnf_name: {get_param: vnf_name} + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + size: { get_param: stark_volume_size } + +outputs: + + stark_volume_0: + value: {get_resource: stark_volume_0} + description: test + diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.env b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.env new file mode 100755 index 0000000..1df1e99 --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.env @@ -0,0 +1,4 @@ +parameters: + + stark_volume_size: 1 + count: 2 \ No newline at end of file diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.yaml new file mode 100755 index 0000000..0273569 --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/base_stark_volume.yaml @@ -0,0 +1,51 @@ +heat_template_version: 2014-10-16 + +description: > + this is a test + +parameters: + + count: + type: string + description: nsdkfla + + vnf_name: + type: string + label: VF name + description: Unique name for this VF instance. + + vf_module_id: + type: string + label: VF module id + description: VF module id + + vf_module_name: + type: string + label: VF module name + description: Unique name for this VF module instance. + + stark_volume_size: + type: number + label: stark cinder volume size + description: Size of the Cinder volume. Measured in gigabytes. + +resources: + + stark_volume_RG: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: count } + resource_def: + type: base_stark_nested_volume.yaml + properties: + vnf_name: {get_param: vnf_name} + vf_module_id: { get_param: vf_module_id } + vf_module_name: { get_param: vf_module_name } + stark_volume_size: { get_param: stark_volume_size } + +outputs: + + stark_volumes: + value: { get_attr: [stark_volume_RG, stark_volume_0] } + description: test + diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml deleted file mode 100644 index 0d4755b..0000000 --- a/ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf8 -*- -# ============LICENSE_START==================================================== -# org.onap.vvp/validation-scripts -# =================================================================== -# Copyright © 2019 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# -# Unless otherwise specified, all software contained herein is licensed -# under the Apache License, Version 2.0 (the "License"); -# you may not use this software except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# -# Unless otherwise specified, all documentation contained herein is licensed -# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); -# you may not use this documentation except in compliance with the License. -# You may obtain a copy of the License at -# -# https://creativecommons.org/licenses/by/4.0/ -# -# Unless required by applicable law or agreed to in writing, documentation -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ============LICENSE_END============================================ -# -# - -# VERSION = '1.0.0' - ---- -description: base - -parameters: - vm_type_volume_name_0: - type: string - vm_type_volume_size_0: - type: number - -resources: - server_0: - type: nested_template_1.yaml - properties: - name: { get_param: name } - my_resource_group_1: - type: OS::Heat::ResourceGroup - properties: - count: 5 - resource_def: { type: nested_template_good.yaml } - -outputs: - vm_type_volume_id_0: - value: {get_resource: vm_type_volume_0} diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml deleted file mode 100644 index 5b626a2..0000000 --- a/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf8 -*- -# ============LICENSE_START==================================================== -# org.onap.vvp/validation-scripts -# =================================================================== -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# -# Unless otherwise specified, all software contained herein is licensed -# under the Apache License, Version 2.0 (the "License"); -# you may not use this software except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# -# Unless otherwise specified, all documentation contained herein is licensed -# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); -# you may not use this documentation except in compliance with the License. -# You may obtain a copy of the License at -# -# https://creativecommons.org/licenses/by/4.0/ -# -# Unless required by applicable law or agreed to in writing, documentation -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ============LICENSE_END============================================ -# -# - -# VERSION = '1.0.0' - ---- -heat_template_version: 2013-05-23 - -resources: - volume: - type: OS::Cinder::Volume - properties: - size: 1 - - volume_attachment: - type: OS::Cinder::VolumeAttachment - properties: - volume_id: { get_resource: volume } - instance_uuid: { get_resource: instance } - - instance: - type: OS::Nova::Server - properties: - image: myimage - flavor: m1.small diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml deleted file mode 100644 index 5b626a2..0000000 --- a/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# -*- coding: utf8 -*- -# ============LICENSE_START==================================================== -# org.onap.vvp/validation-scripts -# =================================================================== -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# =================================================================== -# -# Unless otherwise specified, all software contained herein is licensed -# under the Apache License, Version 2.0 (the "License"); -# you may not use this software except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# -# Unless otherwise specified, all documentation contained herein is licensed -# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); -# you may not use this documentation except in compliance with the License. -# You may obtain a copy of the License at -# -# https://creativecommons.org/licenses/by/4.0/ -# -# Unless required by applicable law or agreed to in writing, documentation -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# ============LICENSE_END============================================ -# -# - -# VERSION = '1.0.0' - ---- -heat_template_version: 2013-05-23 - -resources: - volume: - type: OS::Cinder::Volume - properties: - size: 1 - - volume_attachment: - type: OS::Cinder::VolumeAttachment - properties: - volume_id: { get_resource: volume } - instance_uuid: { get_resource: instance } - - instance: - type: OS::Nova::Server - properties: - image: myimage - flavor: m1.small diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/stark_nested.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/stark_nested.yaml new file mode 100755 index 0000000..b2ca936 --- /dev/null +++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/stark_nested.yaml @@ -0,0 +1,170 @@ +heat_template_version: 2015-04-30 + +description: | + stark nested template + +parameters: + + stark_volumes: + type: comma_delimited_list + description: ndjsfka + + index: + type: number + description: nsadlf + + dummy_net_id: + type: string + description: nsdaljfnsak + + dummy_subnet_id: + type: string + description: nsdaljfnsak + + stark_dummy_ips: + type: comma_delimited_list + description: dsnafljsadnlfks + + vnf_name: + label: VNF name + description: this name will also be used on VM server and other resources. + type: string + + vnf_id: + label: VNF ID + description: 'This ID will be passed as metadata on all Nova Servers, Cinder Volumes, and any other resource that supports metadata' + type: string + + vf_module_id: + type: string + description: Unique ID for this VF Module instance + + vf_module_name: + type: string + description: Unique name for this VF Module instance + + vm_role: + type: string + description: role tagged to VM + + stark_flavor_name: + label: VMs flavor + description: The JSON map containing the nova Flavors to be used for the VM Servers + type: string + + stark_image_name: + type: string + description: "stark image name" + + stark_names: + type: comma_delimited_list + description: VM name for stark VM 1 + + workload_context: + type: string + description: Workload Context for this VNF instance + + environment_context: + type: string + description: Environment Context for this VNF instance + + stark_dummy_floating_ip: + type: string + description: Test floating IP test + + int_mummy_net_id: + type: string + description: Test floating IP test + + int_mummy_subnet_id: + type: string + description: Test floating IP test + + stark_int_mummy_ips: + type: comma_delimited_list + description: Test floating IP test + + oam_net_fqdn: + type: string + description: nsdaklfnsaklfsdl + + oam2_net_fqdn: + type: string + description: ndjfls + + instance_ip_address: + type: string + description: nsdlfkn + + mycontrailip: + type: string + description: njsaf + +resources: + + fw_0_oam_protected_vmi_0_IP_0: + type: OS::ContrailV2::InstanceIp + properties: + instance_ip_address: { get_param: instance_ip_address } + + fw_0_oam_vmi_0: + type: OS::ContrailV2::VirtualMachineInterface + properties: + virtual_network_refs: + - get_param: oam_net_fqdn + - get_param: oam2_net_fqdn + virtual_machine_interface_allowed_address_pairs: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair: + [{ + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip: + { + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix: { get_param: mycontrailip }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: "fasdfas", + }, + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac: "test123", + virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: "asdfasdf", + }], + } + + stark_0_dummy_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: dummy_net_id } + fixed_ips: + - subnet: { get_param: dummy_subnet_id } + ip_address: { get_param: [stark_dummy_ips, { get_param: index }] } + allowed_address_pairs: + - ip_address: { get_param: stark_dummy_floating_ip } + + stark_0_int_mummy_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_mummy_net_id } + fixed_ips: + - subnet: { get_param: int_mummy_subnet_id } + ip_address: { get_param: [stark_int_mummy_ips, { get_param: index }] } + + stark_server_0: + type: OS::Nova::Server + properties: + name: { get_param: [stark_names, { get_param: index }] } + image: { get_param: stark_image_name} + flavor: { get_param: stark_flavor_name } + networks: + - port: { get_resource: stark_0_dummy_port_0 } + - port: { get_resource: stark_0_int_mummy_port_0 } + metadata: + vnf_id: {get_param: vnf_id} + vnf_name: {get_param: vnf_name} + vf_module_id: {get_param: vf_module_id} + vf_module_name: {get_param: vf_module_name} + vm_role: {get_param: vm_role} + workload_context: {get_param: workload_context } + environment_context: {get_param: environment_context } + + stark_volume_attachment_0: + type: OS::Cinder::VolumeAttachment + properties: + instance_uuid: {get_resource: stark_server_0 } + volume_id: {get_param: [stark_volumes, { get_param: index }] } -- cgit 1.2.3-korg