summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src/main/resources/open-cli-schema/hot/vtp-validate-hot.yaml
blob: 1cb58191093e41b3c28ac93ae12e0f49a79fb77d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2019 Huawei Technologies Co., Ltd.
#
# 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: hot-validate
description: |
   Validates the OpenStack heat templates using ONAP VNFREQS with help of VVP scripts
   Before using this command, please install the VVP by following guidelines from
   https://github.com/onap/vvp-validation-scripts#installation

info:
  product: onap-dublin
  version: 1.0
  service: vnf-compliance
  author: ONAP VTP Team onap-discuss@lists.onap.org
  type: cmd

parameters:
  - name: hot-folder
    description: HOT folder path where VNF package files are kept
    long_option: hot-folder
    short_option: b
    type: string
    is_optional: false
  - name: script-folder
    description: Pytest script folder path
    long_option: script-folder
    default_value: $s{env:ONAP_VVP_HOME}
    short_option: n
    type: string
    is_optional: false

results:
  direction: landscape
  attributes:
     - name: vnfrqts
       description: vnfrqts identifiers
       scope: short
       type: string
     - name: test
       description: test case
       scope: short
       type: string
     - name: template
       description: template file
       scope: short
       type: string
     - name: message
       description: error message
       scope: short
       type: string
cmd:
  command:
    - pytest ${script-folder} --template-directory=${hot-folder}
  success_codes:
    - 0
    - 1
    - 2
    - 5
  pass_codes:
    - 0
    - 2
    - 5
  working_directory: .
  output: $s{file:${script-folder}/output/failures}
  result_map:
    vnfrqts: $o{$.*.vnfrqts}
    test: $o{$.*.test}
    template: $o{$.*.file}
    message: $o{$.*.message}