From e3de4c9d214983d38a7d66e89dae5d4bba170ca3 Mon Sep 17 00:00:00 2001 From: Joanna Jeremicz Date: Wed, 21 Apr 2021 13:59:12 +0200 Subject: Integrate helm validator with SDC-BE - Read helm validator configuration - Add call to helm validator during Helm validation - Add JUnit tests - Fix display message when CNF upload is unsuccessful - Show warning messages from validation after CNF upload Issue-ID: SDC-3185 Signed-off-by: Joanna Jeremicz Change-Id: If197d557e6ddef4a07bef986d7cf133aedcb2cc5 Signed-off-by: Piotr Marcinkiewicz --- .../openecomp-sdc-validation-impl/pom.xml | 8 +- .../impl/util/HelmValidatorConfigReader.java | 78 +++++++++ .../impl/util/HelmValidatorHttpClient.java | 73 ++++++++ .../impl/validators/GlobalContextUtil.java | 14 +- .../validation/impl/validators/HeatValidator.java | 11 +- .../validation/impl/validators/HelmValidator.java | 106 ++++++++++++ .../impl/validators/PmDictionaryValidator.java | 3 +- .../validation/impl/validators/YamlValidator.java | 3 +- .../type/helmvalidator/HelmValidatorConfig.java | 78 +++++++++ .../helmvalidator/HelmValidatorErrorResponse.java | 34 ++++ .../type/helmvalidator/HelmValidatorResponse.java | 66 ++++++++ .../impl/util/HelmValidatorConfigReaderTest.java | 113 +++++++++++++ .../impl/util/HelmValidatorHttpClientTest.java | 185 +++++++++++++++++++++ .../impl/validators/GlobalContextUtilTest.java | 10 +- .../impl/validators/HelmValidatorTest.java | 141 ++++++++++++++++ .../helm_validator/valid_chart/MANIFEST.json | 11 ++ .../helm_validator/valid_chart/chart.tgz | Bin 0 -> 259 bytes .../helm_validator/valid_two_charts/MANIFEST.json | 16 ++ .../helm_validator/valid_two_charts/chart1.tgz | Bin 0 -> 259 bytes .../helm_validator/valid_two_charts/chart2.tgz | Bin 0 -> 258 bytes 20 files changed, 934 insertions(+), 16 deletions(-) create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HelmValidatorConfigReader.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/util/HelmValidatorHttpClient.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/HelmValidator.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/helmvalidator/HelmValidatorConfig.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/helmvalidator/HelmValidatorErrorResponse.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/type/helmvalidator/HelmValidatorResponse.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/util/HelmValidatorConfigReaderTest.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/util/HelmValidatorHttpClientTest.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/java/org/openecomp/sdc/validation/impl/validators/HelmValidatorTest.java create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/helm_validator/valid_chart/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/helm_validator/valid_chart/chart.tgz create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/helm_validator/valid_two_charts/MANIFEST.json create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/helm_validator/valid_two_charts/chart1.tgz create mode 100644 openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/test/resources/org/openecomp/validation/validators/helm_validator/valid_two_charts/chart2.tgz (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml index a34e4daa10..d88e3f7431 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/pom.xml @@ -1,6 +1,6 @@