f3daaf601a54ac670f31c614c8f40cc582d6fb12
[cli.git] /
1 # Copyright 2019 Huawei Technologies Co., Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 open_cli_schema_version: 1.0
16 name: service-model-add-artifact
17 description: Add a artifact to a Service model
18
19 info:
20   product: onap-elalto
21   service: sdc.catalog
22   author: ONAP HPA Team onap-discuss@lists.onap.org
23
24
25 parameters:
26   - name: service-id
27     description: Service Unique Id
28     type: string
29     long_option: service-id
30     short_option: x
31     is_optional: false
32   - name: remarks
33     description: certification remarks
34     type: string
35     long_option: remarks
36     short_option: y
37     default_value: Uploaded from ONAP CLI
38     is_optional: true
39   - name: artifact
40     description: NS CSAR file
41     type: byte
42     long_option: artifact
43     short_option: z
44     is_optional: false
45   - name: artifact-name
46     description: NS CSAR name
47     type: string
48     long_option: artifact-name
49     short_option: b
50     is_optional: false
51   - name: artifact-label
52     description: Artifact Label
53     type: string
54     long_option: artifact-label
55     short_option: l
56     default_value: artifactLabel
57     is_optional: false
58   - name: artifact-group-type
59     description: Upload Artifact Group Type
60     type: string
61     long_option: artifact-group-type
62     short_option: g
63     default_value: INFORMATIONAL
64     is_optional: true
65   - name: user-id
66     description: Designer user id
67     type: string
68     long_option: user-id
69     short_option: e
70     default_value: cs0008
71     is_optional: true
72 http:
73   service:
74     name: sdc
75     version: v1.0
76     auth: basic
77     mode: direct
78   request:
79     uri: /sdc2/rest/v1/catalog/services/${service-id}/artifacts
80     method: POST
81     headers:
82       Content-MD5: $s{md5:__body__}
83       USER_ID: ${user-id}
84     body: '{"payloadData":"${artifact}","artifactDisplayName":"${artifact-name}","artifactType":"OTHER","description":"${remarks}","artifactName":"${artifact-name}", "artifactLabel":"${artifact-label}","artifactGroupType":"${artifact-group-type}", artifactChecksum="$s{md5:artifact}"}'
85   success_codes:
86     - 200