5bd2fad6f92987e70f9297bd2b025a366e4ff80f
[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: user-id
52     description: Designer user id
53     type: string
54     long_option: user-id
55     short_option: e
56     default_value: cs0008
57     is_optional: true
58 http:
59   service:
60     name: sdc
61     version: v1.0
62     auth: basic
63     mode: direct
64   request:
65     uri: /sdc2/rest/v1/catalog/services/${service-id}/artifacts
66     method: POST
67     headers:
68       Content-MD5: $s{md5:__body__}
69       USER_ID: ${user-id}
70     body: '{"payloadData":"${artifact}","artifactDisplayName":"${artifact-name}","artifactType":"OTHER","description":"${remarks}","artifactName":"${artifact-name}", "artifactLabel":"${artifact-name}","artifactGroupType":"INFORMATIONAL", artifactChecksum="$s{md5:artifact}"}'
71   success_codes:
72     - 200