NovaServer NamingConventionGuideLineValidator 31/24431/1
authormojahidi <mojahidul.islam@amdocs.com>
Mon, 20 Nov 2017 13:56:57 +0000 (19:26 +0530)
committermojahidi <mojahidul.islam@amdocs.com>
Mon, 20 Nov 2017 13:57:21 +0000 (19:27 +0530)
This task is about  updating  error messages with error codes for NovaServerNamingConventionGuideLineValidator

Change-Id: I7217ef464bc4f674fdb9480d76cb059f20da7411
Issue-ID:SDC-572
Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
90 files changed:
openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/services/HeatStructureUtil.java
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidatorTest.java
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/availability_zone_name/expected_output/expected_output.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/naming_convention/availability_zone_name/expected_output/expected_output.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/availability_zone_name/input/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/naming_convention/availability_zone_name/input/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/availability_zone_name/input/hot-nimbus-pps_v1.0.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/naming_convention/availability_zone_name/input/hot-nimbus-pps_v1.0.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/hot-nimbus-pps_v1.0.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/hot-nimbus-pps_v1.0.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/first.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/negative/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/negative/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/negative/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/negative/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/negative/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/positive/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/positive/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/positive/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/positive/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/positive/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/negative/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/negative/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/negative/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/negative/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/negative/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/positive/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/positive/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/positive/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/positive/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerAvailabilityZoneName/positive/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/negative/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/negative/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/negative/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/negative/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/negative/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/positive/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/positive/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/positive/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/positive/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerImageAndFlavor/positive/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negative/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negative/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negative/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/first.yaml with 92% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negative/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negative/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativePort/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativePort/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativePort/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativePort/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativePort/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/MANIFEST.json [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input/MANIFEST.json with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/first.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/firstVol.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input/firstVol.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/second.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input/second.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/first.env [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input/first.env with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/first.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/firstVol.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/second.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/firstVol.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/second.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/first.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/firstVol.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/second.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/first.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/firstVol.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/second.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/MANIFEST.json [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/first.env [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/first.yaml [moved from openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input/first.yaml with 100% similarity]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/firstVol.yaml [new file with mode: 0644]
openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/second.yaml [new file with mode: 0644]

index cd217a5..513b185 100644 (file)
@@ -59,7 +59,7 @@ public class HeatStructureUtil {
         if (!(getFunctionValue instanceof String) && functionName.equals(
             ResourceReferenceFunctions.GET_RESOURCE.getFunction())) {
           globalContext.addMessage(filename, ErrorLevel.ERROR, ErrorMessagesFormatBuilder
-                  .getErrorWithParameters(Messages.INVALID_GET_RESOURCE_SYNTAX.getErrorMessage(),
+                  .getErrorWithParameters(globalContext.getMessageCode(), Messages.INVALID_GET_RESOURCE_SYNTAX.getErrorMessage(),
                       getFunctionValue == null ? "null" : getFunctionValue.toString()),
               LoggerTragetServiceName.VALIDATE_GET_RESOURCE, "Invalid get_resource syntax");
           return valuesNames;
index 0a7ff87..b98b6d6 100644 (file)
@@ -5,6 +5,7 @@ import static java.util.Objects.nonNull;
 import org.apache.commons.collections4.MapUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
+import org.openecomp.core.validation.ErrorMessageCode;
 import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
 import org.openecomp.core.validation.types.GlobalValidationContext;
 import org.openecomp.sdc.common.errors.Messages;
@@ -37,16 +38,30 @@ import java.util.TreeMap;
 
 public class NovaServerNamingConventionGuideLineValidator implements ResourceValidator {
   private static MdcDataDebugMessage mdcDataDebugMessage = new MdcDataDebugMessage();
+  private static final ErrorMessageCode ERROR_CODE_NNS1 = new ErrorMessageCode("NNS1");
+  private static final ErrorMessageCode ERROR_CODE_NNS2 = new ErrorMessageCode("NNS2");
+  private static final ErrorMessageCode ERROR_CODE_NNS3 = new ErrorMessageCode("NNS3");
+  private static final ErrorMessageCode ERROR_CODE_NNS4 = new ErrorMessageCode("NNS4");
+  private static final ErrorMessageCode ERROR_CODE_NNS5 = new ErrorMessageCode("NNS5");
+  private static final ErrorMessageCode ERROR_CODE_NNS6 = new ErrorMessageCode("NNS6");
+  private static final ErrorMessageCode ERROR_CODE_NNS7 = new ErrorMessageCode("NNS7");
+  private static final ErrorMessageCode ERROR_CODE_NNS8 = new ErrorMessageCode("NNS8");
+  private static final ErrorMessageCode ERROR_CODE_NNS9 = new ErrorMessageCode("NNS9");
+  private static final ErrorMessageCode ERROR_CODE_NNS10 = new ErrorMessageCode("NNS10");
+  private static final ErrorMessageCode ERROR_CODE_NNS11 = new ErrorMessageCode("NNS11");
+  private static final ErrorMessageCode ERROR_CODE_NNS12 = new ErrorMessageCode("NNS12");
+  private static final ErrorMessageCode ERROR_CODE_NNS13 = new ErrorMessageCode("NNS13");
+  private static final ErrorMessageCode ERROR_CODE_NNS14 = new ErrorMessageCode("NNS14");
 
   @Override
   public void validate(String fileName, Map.Entry<String, Resource> resourceEntry,
                        GlobalValidationContext globalContext, ValidationContext validationContext) {
 
     NamingConventionValidationContext namingConventionValidationContext =
-        (NamingConventionValidationContext)validationContext;
+            (NamingConventionValidationContext)validationContext;
     validateHeatNovaResource(fileName, namingConventionValidationContext.getEnvFileName(),
-        namingConventionValidationContext.getHeatOrchestrationTemplate(),
-        globalContext);
+            namingConventionValidationContext.getHeatOrchestrationTemplate(),
+            globalContext);
   }
 
   private void validateHeatNovaResource(String fileName, String envFileName,
@@ -63,13 +78,13 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     }
 
     heatOrchestrationTemplate
-        .getResources()
-        .entrySet()
-        .stream()
-        .filter(entry -> entry.getValue().getType()
-            .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()))
-        .forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName,
-            entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext));
+            .getResources()
+            .entrySet()
+            .stream()
+            .filter(entry -> entry.getValue().getType()
+                    .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource()))
+            .forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName,
+                    entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext));
 
     mdcDataDebugMessage.debugExitMessage("file", fileName);
   }
@@ -84,9 +99,9 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     mdcDataDebugMessage.debugEntryMessage("file", fileName);
 
     validateNovaServerResourceMetaData(fileName, resourceId,
-        heatOrchestrationTemplate.getResources().get(resourceId), globalContext);
+            heatOrchestrationTemplate.getResources().get(resourceId), globalContext);
     validateNovaServerResourceNetworkUniqueRole(fileName, resourceId, uniqueResourcePortNetworkRole,
-        heatOrchestrationTemplate, globalContext);
+            heatOrchestrationTemplate, globalContext);
     validateAvailabilityZoneName(fileName, resourceEntry, globalContext);
     validateNovaServerNameImageAndFlavor(fileName, envFileName, resourceEntry, globalContext);
 
@@ -106,13 +121,14 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
       novaServerPropMetadata = novaServerProp.get("metadata");
       if (novaServerPropMetadata == null) {
         globalValidationContext.addMessage(
-            fileName,
-            ErrorLevel.WARNING,
-            ErrorMessagesFormatBuilder
-                .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_METADATA.getErrorMessage(),
-                    resourceId),
-            LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
-            LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
+                fileName,
+                ErrorLevel.WARNING,
+                ErrorMessagesFormatBuilder
+                        .getErrorWithParameters(
+                                ERROR_CODE_NNS1, Messages.MISSING_NOVA_SERVER_METADATA.getErrorMessage(),
+                                resourceId),
+                LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
+                LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
       } else if (novaServerPropMetadata instanceof Map) {
         TreeMap<String, Object> propertyMap = new TreeMap(new Comparator<String>() {
 
@@ -134,21 +150,23 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
         propertyMap.putAll((Map) novaServerPropMetadata);
         if (!propertyMap.containsKey("vf_module_id")) {
           globalValidationContext.addMessage(
-              fileName,
-              ErrorLevel.WARNING,
-              ErrorMessagesFormatBuilder.getErrorWithParameters(
-                  Messages.MISSING_NOVA_SERVER_VF_MODULE_ID.getErrorMessage(), resourceId),
-              LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
-              LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
+                  fileName,
+                  ErrorLevel.WARNING,
+                  ErrorMessagesFormatBuilder.getErrorWithParameters(
+                          ERROR_CODE_NNS2, Messages.MISSING_NOVA_SERVER_VF_MODULE_ID.getErrorMessage(),
+                          resourceId),
+                  LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
+                  LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
         }
         if (!propertyMap.containsKey("vnf_id")) {
           globalValidationContext.addMessage(
-              fileName, ErrorLevel.WARNING,
-              ErrorMessagesFormatBuilder
-                  .getErrorWithParameters(Messages.MISSING_NOVA_SERVER_VNF_ID.getErrorMessage(),
-                      resourceId),
-              LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
-              LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
+                  fileName, ErrorLevel.WARNING,
+                  ErrorMessagesFormatBuilder
+                          .getErrorWithParameters(
+                                  ERROR_CODE_NNS3, Messages.MISSING_NOVA_SERVER_VNF_ID.getErrorMessage(),
+                                  resourceId),
+                  LoggerTragetServiceName.VALIDATE_NOVA_META_DATA_NAME,
+                  LoggerErrorDescription.MISSING_NOVA_PROPERTIES);
         }
       }
     }
@@ -168,17 +186,17 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     String role = null;
 
     Object propertyNetworkValue =
-        heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks");
+            heatOrchestrationTemplate.getResources().get(resourceId).getProperties().get("networks");
     if (propertyNetworkValue != null && propertyNetworkValue instanceof List) {
       List<String> portResourceIdList =
-          getNovaNetworkPortResourceList(fileName, (List) propertyNetworkValue,
-              globalValidationContext);
+              getNovaNetworkPortResourceList(fileName, (List) propertyNetworkValue,
+                      globalValidationContext);
       for (String portResourceId : portResourceIdList) {
         Resource portResource = heatOrchestrationTemplate.getResources().get(portResourceId);
         if (portResource != null && portResource.getType()
-            .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
+                .equals(HeatResourcesTypes.NEUTRON_PORT_RESOURCE_TYPE.getHeatResource())) {
           Map portNetwork =
-              getPortNetwork(fileName, resourceId, portResource, globalValidationContext);
+                  getPortNetwork(fileName, resourceId, portResource, globalValidationContext);
           if (Objects.nonNull(portNetwork)) {
             network = portNetwork.get("get_param");
             if (Objects.nonNull(network)) {
@@ -189,13 +207,13 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
               }
               if (role != null && uniqueResourcePortNetworkRole.containsKey(role)) {
                 globalValidationContext.addMessage(
-                    fileName,
-                    ErrorLevel.WARNING,
-                    ErrorMessagesFormatBuilder.getErrorWithParameters(
-                        Messages.RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE
-                            .getErrorMessage(), resourceId, role),
-                    LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW,
-                    LoggerErrorDescription.RESOURCE_UNIQUE_NETWORK_ROLE);
+                        fileName,
+                        ErrorLevel.WARNING,
+                        ErrorMessagesFormatBuilder.getErrorWithParameters(
+                                ERROR_CODE_NNS12, Messages.RESOURCE_CONNECTED_TO_TWO_EXTERNAL_NETWORKS_WITH_SAME_ROLE
+                                        .getErrorMessage(), resourceId, role),
+                        LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW,
+                        LoggerErrorDescription.RESOURCE_UNIQUE_NETWORK_ROLE);
               } else {
                 uniqueResourcePortNetworkRole.put(role, portResourceId);
               }
@@ -210,12 +228,13 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
 
   private List<String> getNovaNetworkPortResourceList(String filename, List propertyNetworkValue,
                                                       GlobalValidationContext globalContext) {
+    globalContext.setMessageCode(ERROR_CODE_NNS14);
     List<String> portResourceIdList = new ArrayList<>();
     for (Object propValue : propertyNetworkValue) {
       Object portPropValue = ((Map) propValue).get("port");
       Collection<String> portResourceIds = HeatStructureUtil
-          .getReferencedValuesByFunctionName(filename, "get_resource", portPropValue,
-              globalContext);
+              .getReferencedValuesByFunctionName(filename, "get_resource", portPropValue,
+                      globalContext);
       if (portResourceIds != null) {
         portResourceIdList.addAll(portResourceIds);
       }
@@ -246,13 +265,14 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     }
     if (!(portNetwork instanceof Map)) {
       globalValidationContext.addMessage(
-          fileName,
-          ErrorLevel.WARNING,
-          ErrorMessagesFormatBuilder
-              .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
-                  "network or network_id", resourceId),
-          LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW,
-          LoggerErrorDescription.MISSING_GET_PARAM);
+              fileName,
+              ErrorLevel.WARNING,
+              ErrorMessagesFormatBuilder
+                      .getErrorWithParameters(
+                              ERROR_CODE_NNS4, Messages.MISSING_GET_PARAM.getErrorMessage(),
+                              "network or network_id", resourceId),
+              LoggerTragetServiceName.VALIDATE_RESOURCE_NETWORK_UNIQUE_ROLW,
+              LoggerErrorDescription.MISSING_GET_PARAM);
       return null;
     }
     return (Map) portNetwork;
@@ -273,35 +293,35 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     }
 
     Object availabilityZoneMap =
-        resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry
-            .getValue().getProperties().get("availability_zone") : null;
+            resourceEntry.getValue().getProperties().containsKey("availability_zone") ? resourceEntry
+                    .getValue().getProperties().get("availability_zone") : null;
 
     if (nonNull(availabilityZoneMap)) {
       if (availabilityZoneMap instanceof Map) {
         String availabilityZoneName = ValidationUtil.getWantedNameFromPropertyValueGetParam
-            (availabilityZoneMap);
+                (availabilityZoneMap);
 
         if (availabilityZoneName != null) {
           if (!ValidationUtil.evalPattern(availabilityZoneName, regexList)) {
             globalContext.addMessage(
-                fileName,
-                ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters(
-                    Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
-                    ValidationUtil.getMessagePartAccordingToResourceType(resourceEntry),
-                    "Availability Zone",
-                    availabilityZoneName, resourceEntry.getKey()),
-                LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME,
-                LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+                    fileName,
+                    ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters(
+                            ERROR_CODE_NNS5, Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
+                            ValidationUtil.getMessagePartAccordingToResourceType(resourceEntry),
+                            "Availability Zone", availabilityZoneName, resourceEntry.getKey()),
+                    LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME,
+                    LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
           }
         }
       } else {
         globalContext.addMessage(
-            fileName,
-            ErrorLevel.WARNING, ErrorMessagesFormatBuilder
-                .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
-                    "availability_zone", resourceEntry.getKey()),
-            LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME,
-            LoggerErrorDescription.MISSING_GET_PARAM);
+                fileName,
+                ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+                        .getErrorWithParameters(
+                                ERROR_CODE_NNS6, Messages.MISSING_GET_PARAM.getErrorMessage(),
+                                "availability_zone", resourceEntry.getKey()),
+                LoggerTragetServiceName.VALIDATE_AVAILABILITY_ZONE_NAME,
+                LoggerErrorDescription.MISSING_GET_PARAM);
       }
     }
     mdcDataDebugMessage.debugExitMessage("file", fileName);
@@ -314,9 +334,9 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     mdcDataDebugMessage.debugEntryMessage("file", fileName);
 
     String novaName =
-        validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, globalContext);
+            validateNovaServerNamingConvention(fileName, envFileName, resourceEntry, globalContext);
     Map<String, String> legalNovaNamingConventionMap =
-        validateImageAndFlavorFromNovaServer(fileName, resourceEntry, globalContext);
+            validateImageAndFlavorFromNovaServer(fileName, resourceEntry, globalContext);
 
     if (Objects.nonNull(novaName)) {
       legalNovaNamingConventionMap.put("name", novaName);
@@ -324,7 +344,7 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
 
     if (legalNovaNamingConventionMap.keySet().size() > 1) {
       validateNovaServerNameImageAndFlavorSync(fileName, resourceEntry,
-          legalNovaNamingConventionMap, globalContext);
+              legalNovaNamingConventionMap, globalContext);
     }
 
     mdcDataDebugMessage.debugExitMessage("file", fileName);
@@ -364,12 +384,13 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
 
     for (Pair<String, String> imageOrFlavor : imageFlavorPairs) {
       boolean isErrorInImageOrFlavor =
-          isErrorExistWhenValidatingImageOrFlavorNames(fileName, imageOrFlavor, resourceEntry,
-              propertiesMap, globalContext);
+              isErrorExistWhenValidatingImageOrFlavorNames(fileName, imageOrFlavor, resourceEntry,
+                      propertiesMap, globalContext);
       if (!isErrorInImageOrFlavor) {
         Object nameValue = propertiesMap.get(imageOrFlavor.getKey()) == null ? null
-            : propertiesMap.get(imageOrFlavor.getKey());
-        String imageOrFlavorName = ValidationUtil.getWantedNameFromPropertyValueGetParam(nameValue);
+                : propertiesMap.get(imageOrFlavor.getKey());
+        String imageOrFlavorName = ValidationUtil.getWantedNameFromPropertyValueGetParam
+                (nameValue);
         imageAndFlavorLegalNames.put(imageOrFlavor.getKey(), imageOrFlavorName);
       }
     }
@@ -388,17 +409,18 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
     String novaName = null;
     if (nonNull(novaNameGetParam)) {
       novaName =
-          checkNovaNameGetParamValueMap(fileName, novaNameGetParam, resourceEntry, globalContext);
+              checkNovaNameGetParamValueMap(fileName, novaNameGetParam, resourceEntry, globalContext);
       checkIfNovaNameParameterInEnvIsStringOrList(fileName, envFileName, novaName, resourceEntry,
-          globalContext);
+              globalContext);
     } else {
       globalContext.addMessage(
-          fileName,
-          ErrorLevel.WARNING, ErrorMessagesFormatBuilder
-              .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(),
-                  "nova server name", resourceEntry.getKey()),
-          LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
-          LoggerErrorDescription.MISSING_GET_PARAM);
+              fileName,
+              ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+                      .getErrorWithParameters(
+                              ERROR_CODE_NNS7, Messages.MISSING_GET_PARAM.getErrorMessage(),
+                              "nova server name", resourceEntry.getKey()),
+              LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
+              LoggerErrorDescription.MISSING_GET_PARAM);
     }
 
     return novaName;
@@ -411,24 +433,27 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
                                                                GlobalValidationContext globalContext) {
     String propertyName = propertyNameAndRegex.getKey();
     Object nameValue =
-        propertiesMap.get(propertyName) == null ? null : propertiesMap.get(propertyName);
+            propertiesMap.get(propertyName) == null ? null : propertiesMap.get(propertyName);
     String[] regexList = new String[]{propertyNameAndRegex.getValue()};
 
+
     if (nonNull(nameValue)) {
       if (nameValue instanceof Map) {
+        globalContext.setMessageCode(ERROR_CODE_NNS13);
         if (ValidationUtil.validateMapPropertyValue(fileName, resourceEntry, globalContext,
-            propertyName,
-            nameValue, regexList)) {
+                propertyName,
+                nameValue, regexList)) {
           return true;
         }
       } else {
         globalContext.addMessage(
-            fileName,
-            ErrorLevel.WARNING, ErrorMessagesFormatBuilder
-                .getErrorWithParameters(Messages.MISSING_GET_PARAM.getErrorMessage(), propertyName,
-                    resourceEntry.getKey()),
-            LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
-            LoggerErrorDescription.MISSING_GET_PARAM);
+                fileName,
+                ErrorLevel.WARNING, ErrorMessagesFormatBuilder
+                        .getErrorWithParameters(
+                                ERROR_CODE_NNS8, Messages.MISSING_GET_PARAM.getErrorMessage(),
+                                propertyName, resourceEntry.getKey()),
+                LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
+                LoggerErrorDescription.MISSING_GET_PARAM);
         return true;
       }
 
@@ -444,7 +469,7 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
       if (novaServerName instanceof Map) {
         novaNameMap = (Map) novaServerName;
         return novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction()) == null ? null
-            : novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction());
+                : novaNameMap.get(ResourceReferenceFunctions.GET_PARAM.getFunction());
       }
     }
     return null;
@@ -458,11 +483,11 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
       List<Object> getParamNameList = (List) getParamValue;
       String[] regexName = new String[]{".*_names"};
       return isNovaNameAsListLegal(fileName, regexName, getParamNameList, resourceEntry,
-          globalContext);
+              globalContext);
     } else if (getParamValue instanceof String) {
       String[] regexName = new String[]{".*_name_(\\d+)"};
       return isNovaNameAsStringLegal(fileName, (String) getParamValue, regexName, resourceEntry,
-          globalContext);
+              globalContext);
     }
 
     return null;
@@ -478,18 +503,19 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
 
       if (environment != null && MapUtils.isNotEmpty(environment.getParameters())) {
         Object novaServerNameEnvValue =
-            environment.getParameters().containsKey(novaServerName) ? environment.getParameters()
-                .get(novaServerName) : null;
+                environment.getParameters().containsKey(novaServerName) ? environment.getParameters()
+                        .get(novaServerName) : null;
         if (Objects.nonNull(novaServerNameEnvValue)) {
           if (!DefinedHeatParameterTypes
-              .isNovaServerEnvValueIsFromRightType(novaServerNameEnvValue)) {
+                  .isNovaServerEnvValueIsFromRightType(novaServerNameEnvValue)) {
             globalContext.addMessage(
-                fileName,
-                ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters(
-                    Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server",
-                    "Name", novaServerNameEnvValue.toString(), resourceEntry.getKey()),
-                LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
-                LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+                    fileName,
+                    ErrorLevel.WARNING, ErrorMessagesFormatBuilder.getErrorWithParameters(
+                            ERROR_CODE_NNS9, Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
+                            "Server", "Name",
+                            novaServerNameEnvValue.toString(), resourceEntry.getKey()),
+                    LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
+                    LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
           }
         }
       }
@@ -503,15 +529,16 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
                                        GlobalValidationContext globalContext) {
 
     if (getParamNameList.size() != 2 || !ValidationUtil.evalPattern(getParamNameList.get(0),
-        regexName)) {
+            regexName)) {
       globalContext.addMessage(
-          fileName,
-          ErrorLevel.WARNING,
-          ErrorMessagesFormatBuilder.getErrorWithParameters(
-              Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server",
-              "name", getParamNameList.toString(), resourceEntry.getKey()),
-          LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
-          LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+              fileName,
+              ErrorLevel.WARNING,
+              ErrorMessagesFormatBuilder.getErrorWithParameters(
+                      ERROR_CODE_NNS10, Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
+                      "Server",
+                      "name", getParamNameList.toString(), resourceEntry.getKey()),
+              LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
+              LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
       return null;
     }
 
@@ -525,13 +552,14 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
                                          GlobalValidationContext globalContext) {
     if (!ValidationUtil.evalPattern(novaName, regexName)) {
       globalContext.addMessage(
-          fileName,
-          ErrorLevel.WARNING,
-          ErrorMessagesFormatBuilder.getErrorWithParameters(
-              Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(), "Server",
-              "name", novaName, resourceEntry.getKey()),
-          LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
-          LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+              fileName,
+              ErrorLevel.WARNING,
+              ErrorMessagesFormatBuilder.getErrorWithParameters(
+                      ERROR_CODE_NNS10, Messages.PARAMETER_NAME_NOT_ALIGNED_WITH_GUIDELINES.getErrorMessage(),
+                      "Server",
+                      "name", novaName, resourceEntry.getKey()),
+              LoggerTragetServiceName.VALIDATE_NOVA_SERVER_NAME,
+              LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
       return null;
     }
     return novaName;
@@ -554,24 +582,24 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal
 
     if (!isVmNameSync(vmNames)) {
       globalContext.addMessage(
-          fileName,
-          ErrorLevel.WARNING,
-          ErrorMessagesFormatBuilder.getErrorWithParameters(
-              Messages.NOVA_NAME_IMAGE_FLAVOR_NOT_CONSISTENT.getErrorMessage(),
-              resourceEntry.getKey()),
-          LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
-          LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
+              fileName,
+              ErrorLevel.WARNING,
+              ErrorMessagesFormatBuilder.getErrorWithParameters(
+                      ERROR_CODE_NNS11, Messages.NOVA_NAME_IMAGE_FLAVOR_NOT_CONSISTENT.getErrorMessage(),
+                      resourceEntry.getKey()),
+              LoggerTragetServiceName.VALIDATE_IMAGE_AND_FLAVOR_NAME,
+              LoggerErrorDescription.NAME_NOT_ALIGNED_WITH_GUIDELINES);
     }
     mdcDataDebugMessage.debugExitMessage("file", fileName);
   }
 
   private String getVmName(String nameToGetVmNameFrom, String stringToGetIndexOf) {
     int vmIndex =
-        nameToGetVmNameFrom == null ? -1 : nameToGetVmNameFrom.indexOf(stringToGetIndexOf);
+            nameToGetVmNameFrom == null ? -1 : nameToGetVmNameFrom.indexOf(stringToGetIndexOf);
     String vmName = null;
     if (nameToGetVmNameFrom != null) {
       vmName = vmIndex < 0 ? null
-          : trimNonAlphaNumericCharactersFromEndOfString(nameToGetVmNameFrom.substring(0, vmIndex));
+              : trimNonAlphaNumericCharactersFromEndOfString(nameToGetVmNameFrom.substring(0, vmIndex));
     }
     return vmName;
   }
index 0284ebc..fea0b7f 100644 (file)
@@ -18,137 +18,193 @@ public class NovaServerNamingConventionGuideLineValidatorTest {
   NamingConventionGuideLineValidator baseValidator = new NamingConventionGuideLineValidator();
   NovaServerNamingConventionGuideLineValidator resourceValidator = new
       NovaServerNamingConventionGuideLineValidator();
-
+  private static final String PATH = "/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/";
   @Test
   public void testHeatNovaServerMetaDataValidation() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/positive/");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerMetaDataValidation/positive/");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 0);
 
     messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerMetaDataValidation/negative/");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerMetaDataValidation/negative/");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: Missing VNF_ID in Metadata property, Resource ID [FSB2]");
+            "WARNING: [NNS1]: Missing Nova Server Metadata property, Resource ID [FSB2]");
   }
 
   @Test
   public void testNovaServerAvailabilityZoneName() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/positive");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerAvailabilityZoneName/positive");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 0);
 
     messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerAvailabilityZoneName/negative");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerAvailabilityZoneName/negative");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 3);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_a], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS5]: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_a], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
-        "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS5]: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information");
   }
 
   @Test
   public void testNovaImageAndFlavorNames() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/positive");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerImageAndFlavor/positive");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 0);
 
     messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerImageAndFlavor/negative");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerImageAndFlavor/negative");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-flavor], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS13]: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-flavor], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
-        "WARNING: Server 'image' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-image], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS13]: Server 'image' Parameter Name not aligned with Guidelines, Parameter Name [fsb2-image], Resource ID [FSB3]. As a result, VF/VFC Profile may miss this information");
   }
 
   @Test
   public void testNovaResourceNetworkUniqueRole() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/positive/");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaNetworkUniqueRoleConvention/positive/");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 0);
-
     messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaNetworkUniqueRoleConvention/negative/");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaNetworkUniqueRoleConvention/negative/");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: A resource is connected twice to the same network role, Network Role [FSB2], Resource ID [Internal1]");
+            "WARNING: [NNS12]: A resource is connected twice to the same network role, Network Role [FSB2], Resource ID [Internal1]");
   }
 
   @Test
   public void testNovaServerName() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/positive");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerNameValidation/positive");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 0);
 
     messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/heatNovaServerNameValidation/negative/");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaServerNameValidation/negative/");
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 2);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_pps_server_4], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS10]: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [pcrf_pps_server_4], Resource ID [FSB2]. As a result, VF/VFC Profile may miss this information");
   }
 
   @Test
   public void testVMNameSyncInNova() {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/guideLineValidator/novaVMNameSync/input");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "input");
 
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
 
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 4);
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
-        "WARNING: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [CE_server_name], Resource ID [FSB2_legal_2]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS10]: Server 'name' Parameter Name not aligned with Guidelines, Parameter Name [CE_server_name], Resource ID [FSB2_legal_2]. As a result, VF/VFC Profile may miss this information");
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
-        "WARNING: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb_flavor_names], Resource ID [FSB2_legal_3]. As a result, VF/VFC Profile may miss this information");
+            "WARNING: [NNS13]: Server 'flavor' Parameter Name not aligned with Guidelines, Parameter Name [fsb_flavor_names], Resource ID [FSB2_legal_3]. As a result, VF/VFC Profile may miss this information");
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(),
-        "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_1]");
+            "WARNING: [NNS11]: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_1]");
     Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(3).getMessage(),
-        "WARNING: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_2]");
-
+            "WARNING: [NNS11]: Nova Server naming convention in image, flavor and name properties is not consistent, Resource ID [FSB2_illegal_2]");
   }
 
   @Test
   public void testAvailabilityZoneName() throws IOException {
     Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
-        resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
-        "/org/openecomp/validation/validators/naming_convention/availability_zone_name/input");
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "availability_zone_name/input");
 
     Assert.assertNotNull(messages);
     Assert.assertEquals(messages.size(), 1);
 
     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(),
-        "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_name], Resource ID [availability_zone_illegal_name_1]. As a result, VF/VFC Profile may miss this information");
+            messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(0).getMessage(),
+            "WARNING: [NNS5]: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone_name], Resource ID [availability_zone_illegal_name_1]. As a result, VF/VFC Profile may miss this information");
     Assert.assertEquals(
-        messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
-        "WARNING: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [availability_zone_illegal_name_2]. As a result, VF/VFC Profile may miss this information");
+            messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
+            "WARNING: [NNS5]: Server 'Availability Zone' Parameter Name not aligned with Guidelines, Parameter Name [availability_zone], Resource ID [availability_zone_illegal_name_2]. As a result, VF/VFC Profile may miss this information");
+  }
+
+  @Test
+  public void testHeatNovaServerVnfIDValidation() {
+    Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            "/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/");
+    Assert.assertNotNull(messages);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 1);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+            "WARNING: [NNS3]: Missing VNF_ID in Metadata property, Resource ID [FSB2]");
+  }
+
+  @Test
+  public void testHeatNovaServerVfModuleValidation() {
+    Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            "/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/");
+    Assert.assertNotNull(messages);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+            "WARNING: [NNS2]: Missing VF_MODULE_ID in Metadata property, Resource id [FSB2]");
+  }
+
+  @Test
+  public void testMissingParam() {
+    Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaNetworkUniqueRoleConvention/missingportNetwork/");
+    Assert.assertNotNull(messages);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().size(), 4);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+            "WARNING: [NNS4]: Missing get_param in network or network_id, Resource Id [FSB2]");
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(1).getMessage(),
+            "WARNING: [NNS6]: Missing get_param in availability_zone, Resource Id [FSB2]");
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(2).getMessage(),
+            "WARNING: [NNS7]: Missing get_param in nova server name, Resource Id [FSB2]");
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(3).getMessage(),
+            "WARNING: [NNS8]: Missing get_param in flavor, Resource Id [FSB2]");
+  }
+
+  @Test
+  public void testNovaResource() {
+    Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaNetworkUniqueRoleConvention/invalidresource/");
+    Assert.assertNotNull(messages);
+    Assert.assertEquals(messages.get("first.yaml").getErrorMessageList().get(0).getMessage(),
+            "ERROR: [NNS14]: invalid get_resource syntax is in use - 1234 , get_resource function should get the resource id of the referenced resource");
+  }
+
+  @Test
+  public void testEnvFileContent() {
+    Map<String, MessageContainer> messages = ValidationTestUtil.testValidator(baseValidator,
+            resourceValidator, HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource(),
+            PATH + "heatNovaNetworkUniqueRoleConvention/input/");
+    Assert.assertNotNull(messages);
+    Assert.assertEquals(messages.get("hot-nimbus-pps_v1.0.yaml").getErrorMessageList().get(1).getMessage(),
+            "WARNING: [NNS9]: Server 'Name' Parameter Name not aligned with Guidelines, Parameter Name [{key=value}], Resource ID [server_1]. As a result, VF/VFC Profile may miss this information");
   }
 }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/MANIFEST.json
new file mode 100644 (file)
index 0000000..1e719ef
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "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",
+      "data": [
+        {
+          "file": "hot-nimbus-pps_v1.0.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/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/hot-nimbus-pps_v1.0.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/hot-nimbus-pps_v1.0.env
new file mode 100644 (file)
index 0000000..c559836
--- /dev/null
@@ -0,0 +1,11 @@
+parameters:
+  pcrf_pps_server_names: {key : value}
+  pcrf_pps_image_name: PCRF_8.995-ATTM1.0.3.qcow2
+  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/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/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/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/input/hot-nimbus-pps_v1.0.yaml
new file mode 100644 (file)
index 0000000..1b24ac7
--- /dev/null
@@ -0,0 +1,61 @@
+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
+  pcrf_vnf_id:
+    type: string
+    label: PCRF VNF Id
+    description: PCRF VNF Id
+  pcrf_psm_server_name:
+    type: string
+
+resources:
+  script_init:
+    type: OS::Heat::SoftwareConfig
+    properties:
+      group: ungrouped
+      config:
+        str_replace:
+          params:
+            $vm_name: { get_param: pcrf_psm_server_name }
+
+  server_1:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: [pcrf_pps_server_names, 0] }
+      flavor: { get_param: pcrf_pps_flavor_name }
+      image: { get_param: pcrf_pps_image_name }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/invalidresource/first.yaml
new file mode 100644 (file)
index 0000000..d4eae84
--- /dev/null
@@ -0,0 +1,37 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+  FSB2_Internal1:
+      type: OS::Neutron::Port
+      properties:
+        network_id: { get_param: Internal1_net_id }
+  FSB2_Internal2:
+      type: OS::Neutron::Port
+      properties:
+        network_id: { get_param: Internal2_net_name }
+  FSB2_OAM:
+      type: OS::Neutron::Port
+      properties:
+        network_id: { get_param: Internal3_net_id }
+  FSB2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: fsb2_name_2 }
+      block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+      flavor: { get_param: fsb2_flavor_name }
+      availability_zone: { get_param: availability_zone_0 }
+      metadata:
+        VNF_id: { get_param: vnfvfVF_id }
+        vf_module_id: { get_param: vf_module_id }
+      networks:
+        - port: { get_resource: FSB2_Internal1 }
+        - port: { get_resource: FSB2_Internal2 }
+        - port: { get_resource: 1234 }
+outputs:
+  expose_resource_nove_output:
+    description: the pcrf_server
+    value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.env
new file mode 100644 (file)
index 0000000..90bdb18
--- /dev/null
@@ -0,0 +1,2 @@
+parameters:
+network_ids: Internal2_net_id
\ 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/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaNetworkUniqueRoleConvention/missingportNetwork/first.yaml
new file mode 100644 (file)
index 0000000..6cd75df
--- /dev/null
@@ -0,0 +1,43 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+parameters:
+   network_ids:
+     type: string
+     label: FBS2 label
+     description: FBS2 internal id2
+
+resources:
+  FSB2_Internal1:
+      type: OS::Neutron::Port
+      properties:
+        network_id: Internal1_net_id
+  FSB2_Internal2:
+      type: OS::Neutron::Port
+      properties:
+        network_id: { get_param: [network_ids, 0] }
+  FSB2_OAM:
+      type: OS::Neutron::Port
+      properties:
+        network_id: { get_param: Internal1_net_name }
+  FSB2:
+    type: OS::Nova::Server
+    properties:
+      name: fsb2_name_2
+      block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+      flavor:  fsb2_flavor_name
+      availability_zone:  availability_zone_0
+      metadata:
+        VNF_id: { get_param: vnfvfVF_id }
+        vf_module_id: { get_param: vf_module_id }
+      networks:
+        - port: { get_resource: FSB2_Internal1 }
+        - port: { get_resource: FSB2_Internal2 }
+        - port: { get_resource: FSB2_OAM }
+outputs:
+  expose_resource_nove_output:
+    description: the pcrf_server
+    value: { get_resource: FSB2 }
+
+
@@ -11,8 +11,8 @@ resources:
       block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
       flavor: { get_param: fsb2_flavor_name }
       availability_zone: { get_param: availability_zone_0 }
-      metadata:
-        not_VF_id: { get_param: vnfvfVF_id }
+      Not_metadata:
+        VF_id: { get_param: vnfvfVF_id }
         vf_module_id: { get_param: vf_module_id }
       networks:
         - port: { get_resource: FSB2_Internal1 }
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemisningvfmodule/first.yaml
new file mode 100644 (file)
index 0000000..4a47ea2
--- /dev/null
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+  FSB2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: fsb2_name_2 }
+      block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+      flavor: { get_param: fsb2_flavor_name }
+      availability_zone: { get_param: availability_zone_0 }
+      metadata:
+        Not_VnF_id: { get_param: vnfvfVF_id }
+        not_vf_module_id: { get_param: vf_module_id }
+      networks:
+        - port: { get_resource: FSB2_Internal1 }
+        - port: { get_resource: FSB2_Internal2 }
+        - port: { get_resource: FSB2_OAM }
+outputs:
+  expose_resource_nove_output:
+    description: the pcrf_server
+    value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/MANIFEST.json
new file mode 100644 (file)
index 0000000..76ce6de
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "validTest",
+  "description": "Valid Test",
+  "version": "1610",
+  "data": [
+    {
+      "file": "first.yaml",
+      "type": "HEAT",
+      "isBase": true,
+      "data": [
+        {
+          "file": "first.env",
+          "type": "HEAT_ENV"
+        },
+        {
+          "file": "firstVol.yaml",
+          "type": "HEAT_VOL"
+        }
+      ]
+    },
+    {
+      "file": "second.yaml",
+      "type": "HEAT",
+      "isBase": false
+    }
+  ]
+}
\ 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/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/first.yaml
new file mode 100644 (file)
index 0000000..4dd7bdb
--- /dev/null
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+  FSB2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: fsb2_name_2 }
+      block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+      flavor: { get_param: fsb2_flavor_name }
+      availability_zone: { get_param: availability_zone_0 }
+      metadata:
+        Not_VnF_id: { get_param: vnfvfVF_id }
+        vf_module_id: { get_param: vf_module_id }
+      networks:
+        - port: { get_resource: FSB2_Internal1 }
+        - port: { get_resource: FSB2_Internal2 }
+        - port: { get_resource: FSB2_OAM }
+outputs:
+  expose_resource_nove_output:
+    description: the pcrf_server
+    value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/firstVol.yaml
new file mode 100644 (file)
index 0000000..7e82b2a
--- /dev/null
@@ -0,0 +1,19 @@
+
+heat_template_version:  2013-05-23
+
+parameters:
+   not_null:
+     type: number
+     label: not_number
+
+
+resources:
+   volume_expose:
+     type: OS::Cinder::Volume
+     properties:
+       not_null: not_null
+outputs:
+  not_expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/negativemissingvnfid/second.yaml
new file mode 100644 (file)
index 0000000..bb06b9d
--- /dev/null
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+  network_expose:
+    type: OS::Neutron::Net
+
+outputs:
+  expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/MANIFEST.json
new file mode 100644 (file)
index 0000000..76ce6de
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "validTest",
+  "description": "Valid Test",
+  "version": "1610",
+  "data": [
+    {
+      "file": "first.yaml",
+      "type": "HEAT",
+      "isBase": true,
+      "data": [
+        {
+          "file": "first.env",
+          "type": "HEAT_ENV"
+        },
+        {
+          "file": "firstVol.yaml",
+          "type": "HEAT_VOL"
+        }
+      ]
+    },
+    {
+      "file": "second.yaml",
+      "type": "HEAT",
+      "isBase": false
+    }
+  ]
+}
\ 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/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.env
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/first.yaml
new file mode 100644 (file)
index 0000000..b6be85b
--- /dev/null
@@ -0,0 +1,26 @@
+heat_template_version: 2013-05-23
+
+description: heat expose volume resource
+
+resources:
+
+  FSB2:
+    type: OS::Nova::Server
+    properties:
+      name: { get_param: fsb2_name_2 }
+      block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
+      flavor: { get_param: fsb2_flavor_name }
+      availability_zone: { get_param: availability_zone_0 }
+      metadata:
+        VnF_id: { get_param: vnfvfVF_id }
+        vf_module_id: { get_param: vf_module_id }
+      networks:
+        - port: { get_resource: FSB2_Internal1 }
+        - port: { get_resource: FSB2_Internal2 }
+        - port: { get_resource: FSB2_OAM }
+outputs:
+  expose_resource_nove_output:
+    description: the pcrf_server
+    value: { get_resource: FSB2 }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/firstVol.yaml
new file mode 100644 (file)
index 0000000..7e82b2a
--- /dev/null
@@ -0,0 +1,19 @@
+
+heat_template_version:  2013-05-23
+
+parameters:
+   not_null:
+     type: number
+     label: not_number
+
+
+resources:
+   volume_expose:
+     type: OS::Cinder::Volume
+     properties:
+       not_null: not_null
+outputs:
+  not_expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerMetaDataValidation/positive/second.yaml
new file mode 100644 (file)
index 0000000..bb06b9d
--- /dev/null
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+  network_expose:
+    type: OS::Neutron::Net
+
+outputs:
+  expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/MANIFEST.json
new file mode 100644 (file)
index 0000000..76ce6de
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "validTest",
+  "description": "Valid Test",
+  "version": "1610",
+  "data": [
+    {
+      "file": "first.yaml",
+      "type": "HEAT",
+      "isBase": true,
+      "data": [
+        {
+          "file": "first.env",
+          "type": "HEAT_ENV"
+        },
+        {
+          "file": "firstVol.yaml",
+          "type": "HEAT_VOL"
+        }
+      ]
+    },
+    {
+      "file": "second.yaml",
+      "type": "HEAT",
+      "isBase": false
+    }
+  ]
+}
\ 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/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/first.env
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/firstVol.yaml
new file mode 100644 (file)
index 0000000..7e82b2a
--- /dev/null
@@ -0,0 +1,19 @@
+
+heat_template_version:  2013-05-23
+
+parameters:
+   not_null:
+     type: number
+     label: not_number
+
+
+resources:
+   volume_expose:
+     type: OS::Cinder::Volume
+     properties:
+       not_null: not_null
+outputs:
+  not_expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/negative/second.yaml
new file mode 100644 (file)
index 0000000..bb06b9d
--- /dev/null
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+  network_expose:
+    type: OS::Neutron::Net
+
+outputs:
+  expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/MANIFEST.json
new file mode 100644 (file)
index 0000000..76ce6de
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "validTest",
+  "description": "Valid Test",
+  "version": "1610",
+  "data": [
+    {
+      "file": "first.yaml",
+      "type": "HEAT",
+      "isBase": true,
+      "data": [
+        {
+          "file": "first.env",
+          "type": "HEAT_ENV"
+        },
+        {
+          "file": "firstVol.yaml",
+          "type": "HEAT_VOL"
+        }
+      ]
+    },
+    {
+      "file": "second.yaml",
+      "type": "HEAT",
+      "isBase": false
+    }
+  ]
+}
\ 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/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/first.env
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/firstVol.yaml
new file mode 100644 (file)
index 0000000..7e82b2a
--- /dev/null
@@ -0,0 +1,19 @@
+
+heat_template_version:  2013-05-23
+
+parameters:
+   not_null:
+     type: number
+     label: not_number
+
+
+resources:
+   volume_expose:
+     type: OS::Cinder::Volume
+     properties:
+       not_null: not_null
+outputs:
+  not_expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/heatNovaServerNameValidation/positive/second.yaml
new file mode 100644 (file)
index 0000000..bb06b9d
--- /dev/null
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+  network_expose:
+    type: OS::Neutron::Net
+
+outputs:
+  expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: network_expose }
+
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/MANIFEST.json b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/MANIFEST.json
new file mode 100644 (file)
index 0000000..76ce6de
--- /dev/null
@@ -0,0 +1,27 @@
+{
+  "name": "validTest",
+  "description": "Valid Test",
+  "version": "1610",
+  "data": [
+    {
+      "file": "first.yaml",
+      "type": "HEAT",
+      "isBase": true,
+      "data": [
+        {
+          "file": "first.env",
+          "type": "HEAT_ENV"
+        },
+        {
+          "file": "firstVol.yaml",
+          "type": "HEAT_VOL"
+        }
+      ]
+    },
+    {
+      "file": "second.yaml",
+      "type": "HEAT",
+      "isBase": false
+    }
+  ]
+}
\ 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/guideLineValidator/novaserverValidation/input/first.env b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/first.env
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/firstVol.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/firstVol.yaml
new file mode 100644 (file)
index 0000000..7e82b2a
--- /dev/null
@@ -0,0 +1,19 @@
+
+heat_template_version:  2013-05-23
+
+parameters:
+   not_null:
+     type: number
+     label: not_number
+
+
+resources:
+   volume_expose:
+     type: OS::Cinder::Volume
+     properties:
+       not_null: not_null
+outputs:
+  not_expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: volume_expose }
+
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/second.yaml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/guideLineValidator/novaserverValidation/input/second.yaml
new file mode 100644 (file)
index 0000000..bb06b9d
--- /dev/null
@@ -0,0 +1,14 @@
+heat_template_version: 2013-05-23
+
+description: heat second
+
+resources:
+  network_expose:
+    type: OS::Neutron::Net
+
+outputs:
+  expose_resource_network_output:
+    description: the pcrf_server
+    value: { get_resource: network_expose }
+
+