diff options
author | mojahidi <mojahidul.islam@amdocs.com> | 2017-11-22 18:02:49 +0530 |
---|---|---|
committer | mojahidi <mojahidul.islam@amdocs.com> | 2017-11-22 18:03:04 +0530 |
commit | 5650c6a9b50287d572e8e040085d0ce2100a82a1 (patch) | |
tree | 2a91990a512eb857b9493521a1818e2d664baee1 /openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test | |
parent | 683b6a8e84dfe3f205dcc2ef55e1d170579f8831 (diff) |
Heat Validator
This task is about updating error messages with error codes for HeatValidator
Change-Id: I80d918e4ae0541c194634e744545d705907d8e15
Issue-ID: SDC-572
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test')
11 files changed, 332 insertions, 35 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java index 471ed7df10..a523627081 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HeatValidatorTest.java @@ -34,12 +34,13 @@ import java.util.Map; public class HeatValidatorTest { + private static final String RESOURCE_PATH = "/org/openecomp/validation/validators/heat_validator"; private Validator validator = new HeatValidator(); @Test public void testInvalidHeatFormat() { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, - "/org/openecomp/validation/validators/heat_validator/invalid_heat_format/negative_test/input"); + RESOURCE_PATH + "/invalid_heat_format/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -47,21 +48,19 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: Invalid HEAT format problem - [Cannot create property=kuku for JavaBean=Resource{type='null', properties=null, metadata=null, depends_on=null, update_policy='null', deletion_policy='null'}\n" + - " in 'reader', line 25, column 5:\n" + - " kuku: kuku\n" + - " ^\n" + - "Unable to find property 'kuku' on class: org.openecomp.sdc.heat.datatypes.model.Resource\n" + - " in 'reader', line 25, column 11:\n" + - " kuku: kuku\n" + - " ^\n" + - "]"); + "ERROR: [HOT12]: Invalid HEAT format problem - [Cannot create property=kuku for " + + "JavaBean=Resource{type='null', properties=null, metadata=null, depends_on=null, " + + "update_policy='null', deletion_policy='null'}\n" + " in 'reader', line 25, column 5:\n" + + " kuku: kuku\n" + " ^\n" + + "Unable to find property 'kuku' on class: org.openecomp.sdc.heat.datatypes.model." + + "Resource\n" + " in 'reader', line 25, column 11:\n" + " kuku: kuku\n" + + " ^\n" + "]"); } @Test public void testDependsOn() { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, - "/org/openecomp/validation/validators/heat_validator/depends_on_points_to_existing_resource/input"); + RESOURCE_PATH + "/depends_on_points_to_existing_resource/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -69,17 +68,17 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: a Missing resource in depend On, Missing Resource ID [resource_not_exist]"); + "ERROR: [HOT8]: a Missing resource in depend On, Missing Resource ID [resource_not_exist]"); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "ERROR: a Missing resource in depend On, Missing Resource ID [resource_3]"); + "ERROR: [HOT7]: a Missing resource in depend On, Missing Resource ID [resource_3]"); } @Test public void testResourcesReferencesExistInHeat() throws IOException { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/resource_references_exist_in_heat/negative_test/input"); + RESOURCE_PATH + "/resource_references_exist_in_heat/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -87,17 +86,18 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 2); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: Referenced resource - not_existing_resource not found"); + "ERROR: [HOT16]: Referenced resource - not_existing_resource not found"); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "ERROR: invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); + "ERROR: [HOT13]: invalid get_resource syntax is in use - null , get_resource " + + "function should get the resource id of the referenced resource"); } @Test public void testGetResourceValueIsValid() { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/get_resource_value_valid/negative_test/input"); + RESOURCE_PATH + "/get_resource_value_valid/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -105,27 +105,67 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 3); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: invalid get_resource syntax is in use - [param_1, param_2] , get_resource function should get the resource id of the referenced resource"); + "ERROR: [HOT13]: invalid get_resource syntax is in use - [param_1, param_2] , " + + "get_resource function should get the resource id of the referenced resource"); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(), - "ERROR: invalid get_resource syntax is in use - {get_param=param_1} , get_resource function should get the resource id of the referenced resource"); + "ERROR: [HOT13]: invalid get_resource syntax is in use - {get_param=param_1} , " + + "get_resource function should get the resource id of the referenced resource"); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(2).getMessage(), - "ERROR: invalid get_resource syntax is in use - null , get_resource function should get the resource id of the referenced resource"); + "ERROR: [HOT13]: invalid get_resource syntax is in use - null , get_resource " + + "function should get the resource id of the referenced resource"); } @Test public void testTwoResourcesDoesNotHoldSameId() throws IOException { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/two_resources_does_not_hold_same_id/positive_test/input"); + RESOURCE_PATH + "/two_resources_does_not_hold_same_id/positive_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 0); } @Test + public void testWithWrongFileExtension(){ + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + RESOURCE_PATH + "/wrongFileExtension"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.get("single.aad").getErrorMessageList().get(0).getMessage(), + "ERROR: [HOT2]: Wrong ENV file extension - single.aad"); + Assert.assertEquals(messages.get("single.ya").getErrorMessageList().get(0).getMessage(), + "ERROR: [HOT6]: Wrong HEAT file extension - single.ya"); + } + + @Test + public void testWithMissingManifestContent(){ + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + RESOURCE_PATH + "/missingManifestContent"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.get("single.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: [HOT9]: Invalid HEAT format problem - [missing template version]"); + Assert.assertEquals(messages.get("single.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: [HOT10]: Invalid HEAT format problem - " + + "[The heat file does not contain any resources]"); + } + + @Test + public void testWithInvalidHeatContent(){ + Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), + RESOURCE_PATH + "/invalidHeatContent"); + Assert.assertNotNull(messages); + Assert.assertEquals(messages.get("single.yaml").getErrorMessageList().get(0).getMessage(), + "ERROR: [HOT9]: Invalid HEAT format problem - [missing template version]"); + Assert.assertEquals(messages.get("single.yaml").getErrorMessageList().get(1).getMessage(), + "WARNING: [HOT10]: Invalid HEAT format problem - " + + "[The heat file does not contain any resources]"); + Assert.assertEquals(messages.get("mount_iso_script.sh").getErrorMessageList().get(0). + getMessage(),"WARNING: [HOT11]: Artifact file is not referenced."); + } + + @Test public void negativeTestGetParamPointToExistingParameter() throws IOException { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/get_param_points_to_existing_parameter/negative_test/input"); + RESOURCE_PATH + "/get_param_points_to_existing_parameter/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -133,13 +173,14 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: Referenced parameter - not_existing_param_1 - not found, used in resource [server_pcrf_psm_001]"); + "ERROR: [HOT1]: Referenced parameter - not_existing_param_1 - not found, used in " + + "resource [server_pcrf_psm_001]"); } @Test public void testGetAttrFromNested() throws IOException { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/get_attr_from_nested/negative_test/input"); + RESOURCE_PATH + "/get_attr_from_nested/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -147,13 +188,14 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-psm_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: get_attr attribute not found, Attribute name [nested_output], Resource ID [server_pcrf_psm_001]"); + "ERROR: [HOT17]: get_attr attribute not found, Attribute name [nested_output], " + + "Resource ID [server_pcrf_psm_001]"); } @Test public void testDefaultValueAlignWithType() throws IOException { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/default_value_align_with_type/negative_test/input"); + RESOURCE_PATH + "/default_value_align_with_type/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -161,14 +203,15 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: Parameter - pcrf_pps_image_name_1 default value not align with type number"); + "ERROR: [HOT4]: Parameter - pcrf_pps_image_name_1 default value not align with " + + "type number"); } @Test public void testEnvParametersMatchDefinedHeatParameterTypes() throws IOException { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/env_parameters_match_defined_types/negative_test/input"); + RESOURCE_PATH + "/env_parameters_match_defined_types/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -176,14 +219,14 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), - "ERROR: Parameter env value pcrf_pps_flavor_name not align with type"); + "ERROR: [HOT5]: Parameter env value pcrf_pps_flavor_name not align with type"); } @Test public void testReferencedArtifactsExist() throws IOException { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/referenced_artifacts_exist/negative_test/input"); + RESOURCE_PATH + "/referenced_artifacts_exist/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -191,14 +234,14 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(), - "ERROR: Missing artifact - nimbus-ethernet"); + "ERROR: [HOT15]: Missing artifact - nimbus-ethernet"); } @Test public void testEnvContentIsSubSetOfHeatParameters() throws IOException { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(validator, - "/org/openecomp/validation/validators/heat_validator/env_content_is_subset_of_heat/negative_test/input"); + RESOURCE_PATH + "/env_content_is_subset_of_heat/negative_test/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 1); @@ -206,13 +249,14 @@ public class HeatValidatorTest { Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().size(), 1); Assert.assertEquals( messages.get("hot-nimbus-pps_v1.0.env").getErrorMessageList().get(0).getMessage(), - "ERROR: Env file hot-nimbus-pps_v1.0.env includes a parameter not in HEAT - mock_param"); + "ERROR: [HOT3]: Env file hot-nimbus-pps_v1.0.env includes a parameter not in " + + "HEAT - mock_param"); } @Test public void testGetParamPseudoParameters() { Map<String, MessageContainer> messages =ValidationTestUtil.testValidator(new HeatValidator(), - "/org/openecomp/validation/validators/heat_validator/pseudo_parameters/input"); + RESOURCE_PATH + "/pseudo_parameters/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 0); @@ -221,7 +265,7 @@ public class HeatValidatorTest { @Test public void testNoErrorWhenEmptyValueForParameterInEnv() { Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(validator, - "/org/openecomp/validation/validators/heat_validator/env_empty_value/input"); + RESOURCE_PATH + "/env_empty_value/input"); Assert.assertNotNull(messages); Assert.assertEquals(messages.size(), 0); diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/MANIFEST.json new file mode 100644 index 0000000000..3e995864c9 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/MANIFEST.json @@ -0,0 +1,21 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "single.yaml", + "type": "HEAT", + "data": [ + { + "file": "single.env", + "type": "HEAT_ENV" + } + ] + }, + { + "file": "mount_iso_script.sh", + "type": "SHELL" + } + ] +}
\ 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/invalidHeatContent/mount_iso_script.sh b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/mount_iso_script.sh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/mount_iso_script.sh diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.env new file mode 100644 index 0000000000..8ae6fc021a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.env @@ -0,0 +1,11 @@ +parameters: + pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006 + pcrf_pps_image_name_1: 14 + pcrf_pps_flavor_name: lc.3xlarge + availabilityzone_name: nova + pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0 + pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12 + pcrf_cps_net_mask: 255.255.255.0 + pcrf_security_group_name: nimbus_security_group + pcrf_vnf_id: 730797234b4a40aa99335157b02871cd + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.yaml new file mode 100644 index 0000000000..64151b1317 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/invalidHeatContent/single.yaml @@ -0,0 +1,53 @@ +heat_template_version: + +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_1: + type: number + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_2: + type: + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_3: + type: number + default: + 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 + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/MANIFEST.json new file mode 100644 index 0000000000..943bef200d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "single.yaml", + "type": "HEAT", + "data": [ + { + "file": "single.env", + "type": "HEAT_ENV" + } + ] + } + ] +}
\ 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/missingManifestContent/single.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/single.env new file mode 100644 index 0000000000..8ae6fc021a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/single.env @@ -0,0 +1,11 @@ +parameters: + pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006 + pcrf_pps_image_name_1: 14 + pcrf_pps_flavor_name: lc.3xlarge + availabilityzone_name: nova + pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0 + pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12 + pcrf_cps_net_mask: 255.255.255.0 + pcrf_security_group_name: nimbus_security_group + pcrf_vnf_id: 730797234b4a40aa99335157b02871cd + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/single.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/single.yaml new file mode 100644 index 0000000000..1a35c29ba3 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/missingManifestContent/single.yaml @@ -0,0 +1,52 @@ +heat_template_version: + +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_1: + type: number + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_2: + type: + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_3: + type: number + default: + 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 + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/MANIFEST.json new file mode 100644 index 0000000000..b722f1ac76 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/MANIFEST.json @@ -0,0 +1,17 @@ +{ + "name": "validTest", + "description": "Valid Test", + "version": "1610", + "data": [ + { + "file": "single.ya", + "type": "HEAT", + "data": [ + { + "file": "single.aad", + "type": "HEAT_ENV" + } + ] + } + ] +}
\ 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/wrongFileExtension/single.aad b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/single.aad new file mode 100644 index 0000000000..8ae6fc021a --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/single.aad @@ -0,0 +1,11 @@ +parameters: + pcrf_pps_server_names: ZRDM1PCRF01PPS001,ZRDM1PCRF01PPS002,ZRDM1PCRF01PPS003,ZRDM1PCRF01PPS004,ZRDM1PCRF01PPS005,ZRDM1PCRF01PPS006 + pcrf_pps_image_name_1: 14 + pcrf_pps_flavor_name: lc.3xlarge + availabilityzone_name: nova + pcrf_cps_net_name: Mobisupport-25193-I-INT1_int_pcrf_net_0 + pcrf_cps_net_ips: 172.26.16.7,172.26.16.8,172.26.16.9,172.26.16.10,172.26.16.11,172.26.16.12 + pcrf_cps_net_mask: 255.255.255.0 + pcrf_security_group_name: nimbus_security_group + pcrf_vnf_id: 730797234b4a40aa99335157b02871cd + diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/single.ya b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/single.ya new file mode 100644 index 0000000000..555f6ae852 --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/heat_validator/wrongFileExtension/single.ya @@ -0,0 +1,60 @@ +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_1: + type: number + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_2: + type: + default: True + label: PCRF PS image name + description: PCRF PS image name + pcrf_pps_image_name_3: + type: number + default: + 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 + pcrf_vnf_id: + type: string + label: PCRF VNF Id + description: PCRF VNF Id + +resources: + server_pcrf_pps_001: + type: OS::Heat::CloudConfig + properties: + pcrf_pps_server_name: { get_param: [pcrf_pps_server_names, 0] } + + |