fde5fc177f14812f6f2432cef473959e0771446a
[cli.git] / products / onap-dublin / features / vfc / src / main / resources / open-cli-schema / nslcm / vfc-nslcm-sol005-create-schema.yaml
1 # Copyright (c) 2019, CMCC 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: vfc-nslcm-sol-create
17 description: vfc nsclm creat in slo005 api
18
19 info:
20   product: onap-dublin
21   service: vfc
22   author: ONAP VFC Team (yangyanyj@chinamobile.com)
23
24 parameters:
25   - name: ns-csar-uuid
26     description: ns's uuid of csar file
27     type: string
28     short_option: c
29     long_option: ns-csar-uuid
30     is_optional: false
31   - name: ns-csar-name
32     description: ns's name of csar
33     type: string
34     short_option: n
35     long_option: ns-csar-name
36     is_optional: false
37   - name: customer-name
38     description: customer name
39     type: string
40     short_option: q
41     long_option: customer-name
42     is_optional: false
43   - name: service-type
44     description: service type
45     type: string
46     short_option: S
47     long_option: service-type
48     is_optional: false
49
50 results:
51   direction: portrait
52   attributes:
53     - name: ns-instance-id
54       description: ns-instance-id
55       scope: short
56       type: string
57
58 http:
59   service:
60     auth: none
61     mode: direct
62   request:
63     uri: api/nslcm/v1/ns_instances
64     method: POST
65     context:
66       remove_empty_node: true
67     body: '{
68              "nsdId": "${ns-csar-uuid}",
69              "nsName": "${ns-csar-name}",
70              "nsDescription": "description"
71            }'
72     headers:
73       Content-Type: application/json
74       Accept: application/json
75       HTTP_GLOBALCUSTOMERID: '${customer-name}'
76       HTTP_SERVICETYPE: '${service-type}'
77
78   success_codes:
79     - 201
80   result_map:
81     ns-instance-id: $b{$.nsInstanceId}