From 280f8015d06af1f41a3ef12e8300801c7a5e0d54 Mon Sep 17 00:00:00 2001 From: AviZi Date: Fri, 9 Jun 2017 02:39:56 +0300 Subject: [SDC-29] Amdocs OnBoard 1707 initial commit. Change-Id: Ie4d12a3f574008b792899b368a0902a8b46b5370 Signed-off-by: AviZi --- .../negative_test/input/MANIFEST.json | 19 ++++ .../negative_test/input/hot-nimbus-pps_v1.0.yaml | 59 ++++++++++++ .../negative_test/input/hot-nimbus-psm_v1.0.yaml | 98 +++++++++++++++++++ .../input/nested-from-resources-group.yaml | 105 +++++++++++++++++++++ .../negative_test/input/nested-pps_v1.0.yaml | 52 ++++++++++ 5 files changed, 333 insertions(+) create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json new file mode 100644 index 0000000000..0c8e740434 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "hot-mog", + "description": "HOT template to create hot mog server", + "version": "2013-05-23", + "data": [ + { + "file": "hot-nimbus-pps_v1.0.yaml", + "type": "HEAT" + }, + { + "file": "hot-nimbus-psm_v1.0.yaml", + "type": "HEAT" + }, + { + "file": "nested-pps_v1.0.yaml", + "type": "HEAT" + } + ] +} \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml new file mode 100644 index 0000000000..e3779ed99d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-pps_v1.0.yaml @@ -0,0 +1,59 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Policy Server stack + +parameters: + pcrf_pps_server_names: + type: comma_delimited_list + label: PCRF PS server names + description: PCRF PS server names + pcrf_pps_image_name: + type: string + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_flavor_name: + type: string + label: PCRF PS flavor name + description: flavor name of PCRF PS instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + num_instances: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + +resources: + server_pcrf_pps_001: + type: nested-pps_v1.0.yaml + properties: + pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] } + + + resource_with_resources_group: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: nested-not-exist.yaml + properties: + pcrf_psm_server_name: { get_param: pcrf_pps_server_names } + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml new file mode 100644 index 0000000000..dc78b37ca2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/hot-nimbus-psm_v1.0.yaml @@ -0,0 +1,98 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Session Manager stack + +parameters: + num_instances: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_server_names: + type: comma_delimited_list + label: PCRF SM server names + description: name of the PCRF SM instance + pcrf_psm_image_name: + type: string + label: PCRF SM image name + description: PCRF SM image name + pcrf_psm_flavor_name: + type: string + label: PCRF SM flavor name + description: flavor name of PCRF SM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ips: + type: comma_delimited_list + label: CPS network ips + description: CPS network ips + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + pcrf_pps_server_names: + type: string + + pcrf_pps_image_name: + type: string + pcrf_pps_flavor_name: + type: string + availability_zone_0: + type: string +resources: + resource_with_resources_group: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: nested-from-resources-group.yaml + properties: + pcrf_psm_server_name: { get_param: pcrf_pps_server_names } + pcrf_psm_image_name: { get_param: pcrf_pps_image_name } + property_not_in_nested: { get_param: availabilityzone_name } + pcrf_cps_net_name: { get_param: availabilityzone_name } + pcrf_cps_net_ip: { get_param: pcrf_vnf_id } + pcrf_cps_net_mask: { get_param: pcrf_vnf_id } + pcrf_security_group_name: { get_param: pcrf_pps_image_name } + pcrf_vnf_id: { get_param: pcrf_pps_flavor_name } + + availabilityzone_name: { get_param: availability_zone_0 } + + + + resource_without_resources_group: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: OS::Nova::Server + properties: + cloud_zone_id: { get_param: pcrf_pps_server_names } + vf_name: { get_param: pcrf_pps_image_name } + vf_instance_num: { get_param: pcrf_pps_image_name } + vf_component: { get_param: availabilityzone_name } + vm_instance_num: { get_param: availabilityzone_name } + vnf_id: { get_param: pcrf_vnf_id } + vf_module_id: { get_param: pcrf_vnf_id } + bootimage: { get_param: pcrf_pps_image_name } + flavor: { get_param: pcrf_pps_flavor_name } + key_name: { get_param: pcrf_cps_net_mask } + + availability_zone_0: { get_param: availability_zone_0 } + + + + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml new file mode 100644 index 0000000000..836ab5c1f8 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-from-resources-group.yaml @@ -0,0 +1,105 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Session Manager stack + +parameters: + pcrf_psm_server_name: + type: string + label: PCRF SM server name + description: PCRF SM server name + pcrf_psm_image_name: + type: string + label: image name + description: PCRF SM image name + pcrf_psm_flavor_name: + type: string + label: PCRF SM flavor name + description: flavor name of PCRF SM instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + +resources: + network: + type: OS::Heat::CloudConfig + properties: + cloud_config: + write_files: + - path: /etc/sysconfig/network-scripts/ifcfg-eth0 + permissions: "0644" + content: + str_replace: + params: + $dev: eth0 + $ip: { get_param: pcrf_cps_net_ip } + $netmask: { get_param: pcrf_cps_net_mask } + runcmd: + - ifdown eth0 && ifup eth0 + script_init: + type: OS::Heat::SoftwareConfig + properties: + group: ungrouped + config: + str_replace: + params: + $vm_name: { get_param: pcrf_psm_server_name } + pcrf_server_init: + type: OS::Heat::MultipartMime + properties: + parts: + - config: { get_resource: network} + - config: { get_resource: script_init} + + pcrf_server_psm: + type: OS::Nova::Server + properties: + config_drive: "True" + name: { get_param: pcrf_psm_server_name } + image: { get_param: pcrf_psm_image_name } + flavor: { get_param: pcrf_psm_flavor_name } + availability_zone: { get_param: availabilityzone_name } + networks: + - port: { get_resource: psm01_port_0} + user_data_format: RAW + user_data: + get_resource: pcrf_server_init + metadata: + vnf_id: {get_param: pcrf_vnf_id} + #scheduler_hints: {group: { get_resource: servergroup_nimbus }} + + psm01_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: pcrf_cps_net_name } + fixed_ips: + - ip_address: { get_param: pcrf_cps_net_ip } + security_groups: [{ get_param: pcrf_security_group_name }] + + psm01_port_1: + type: hot-nimbus-pps_v1.0.yaml + properties: + network: { get_param: pcrf_cps_net_name } + fixed_ips: + - ip_address: { get_param: pcrf_cps_net_ip } + security_groups: [{ get_param: pcrf_security_group_name }] \ No newline at end of file diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml new file mode 100644 index 0000000000..bdf957c59e --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/resources_group_with_nested/negative_test/input/nested-pps_v1.0.yaml @@ -0,0 +1,52 @@ +heat_template_version: 2013-05-23 + +description: heat template that creates PCRF Policy Server stack + +parameters: + pcrf_pps_server_name: + type: string + label: PCRF PS server name + description: PCRF PS server name + pcrf_pps_image_name: + type: string + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_flavor_name: + type: string + label: PCRF PS flavor name + description: flavor name of PCRF PS instance + availabilityzone_name: + type: string + label: availabilityzone name + description: availabilityzone name + pcrf_cps_net_name: + type: string + label: CPS network name + description: CPS network name + pcrf_cps_net_ip: + type: string + label: CPS network ip + description: CPS network ip + pcrf_cps_net_mask: + type: string + label: CPS network mask + description: CPS network mask + pcrf_security_group_name: + type: string + label: security group name + description: the name of security group + num_instances: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + pcrf_pps_server_names: + type: string +resources: + resource_with_resources_group: + type: OS::Heat::ResourceGroup + properties: + count: { get_param: num_instances } + resource_def: + type: nested-from-resources-group.yaml + properties: + pcrf_psm_server_name: { get_param: pcrf_pps_server_names } \ No newline at end of file -- cgit 1.2.3-korg