diff options
author | Bogumil Zebek <bogumil.zebek@nokia.com> | 2020-06-24 06:48:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-24 06:48:45 +0000 |
commit | 1335f80f88909934ad159530c62ab0f8800c4ec3 (patch) | |
tree | bf6ad1baf2a00533346fa135123bbaf65bf19665 | |
parent | 15640aa55716f0164a58c7d24c268102590f087b (diff) | |
parent | 5c469128d711d2a4f286c5d80d7a662acf508470 (diff) |
Merge "Create new Rule (R816745) that will be used for PM_Dictionary content validation"
3 files changed, 142 insertions, 0 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java new file mode 100644 index 0000000..ef901f9 --- /dev/null +++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745.java @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Nokia. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.cvc.csar.cc.sol004; + +import org.onap.cli.fw.schema.OnapCommandSchema; +import org.onap.cvc.csar.CSARArchive; +import org.onap.cvc.csar.cc.VTPValidateCSARBase; + +@OnapCommandSchema(schema = "vtp-validate-csar-r816745.yaml") +public class VTPValidateCSARR816745 extends VTPValidateCSARBase { + + @Override + protected void validateCSAR(CSARArchive csar) throws Exception { + + } + + @Override + protected String getVnfReqsNo() { + return "R816745"; + } +} diff --git a/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r816745.yaml b/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r816745.yaml new file mode 100644 index 0000000..8ef80dd --- /dev/null +++ b/csarvalidation/src/main/resources/open-cli-schema/sol004/vtp-validate-csar-r816745.yaml @@ -0,0 +1,66 @@ +# Copyright 2020 Nokia. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_schema_version: 1.0 + +name: csar-validate-r816745 + +description: | + The VNF or PNF PROVIDER MUST provide the Service Provider with PM Meta Data (PM Dictionary) + to support the analysis of PM events delivered to DCAE. + The PM Dictionary is to be provided as a separate YAML artifact at onboarding and must follow + the VES Event Listener Specification and VES Event Registration Specification + which contain the format and content required. + + +info: + product: onap-dublin + version: 1.0 + service: vnf-compliance + author: ONAP VTP Team onap-discuss@lists.onap.org + +parameters: + - name: csar + description: CSAR file path + long_option: csar + short_option: b + type: binary + is_optional: false + - name: pnf + description: CSAR file contains PNF + long_option: pnf + short_option: p + type: bool + is_optional: true + default_value: false + +results: + direction: landscape + attributes: + - name: code + description: Error code + scope: short + type: string + - name: message + description: Error message + scope: short + type: string + - name: file + description: File in which error occured + scope: short + type: string + - name: line-no + description: Line no at which error occured + scope: short + type: string diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java new file mode 100644 index 0000000..e75f27e --- /dev/null +++ b/csarvalidation/src/test/java/org/onap/cvc/csar/cc/sol004/VTPValidateCSARR816745IntegrationTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2020 Nokia + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package org.onap.cvc.csar.cc.sol004; + +import org.junit.Before; +import org.junit.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +public class VTPValidateCSARR816745IntegrationTest { + + private static final boolean IS_PNF = true; + + private VTPValidateCSARR816745 testCase; + + @Before + public void setUp() { + testCase = new VTPValidateCSARR816745(); + } + + @Test + public void shouldReturnProperRequestNumber() { + assertThat(testCase.getVnfReqsNo()).isEqualTo("R816745"); + } + +} |