1db8b9d9dc5c2b0e6830f35ab4a8d55837d6674a
[cli.git] /
1 # Copyright 2018 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-create
17 description: Create a service instance using MSO
18
19 info:
20   product: onap-beijing
21   service: so
22   author: ONAP CLI Team onap-discuss@lists.onap.org
23
24 parameters:
25   - name: cloud-region
26     description: cloud region identifier
27     type: string
28     short_option: l
29     long_option: cloud-region
30     is_optional: false
31   - name: tenant-id
32     description: tenant id
33     type: string
34     short_option: b
35     long_option: tenant-id
36     is_optional: false
37   - name: model-invariant-id
38     description: model invariant id generated by ASDC.
39     type: string
40     short_option: e
41     long_option: model-invariant-id
42     is_optional: false
43   - name: model-uuid
44     description: model uuid generated by ASDC.
45     type: string
46     short_option: g
47     long_option: model-uuid
48     is_optional: false
49   - name: model-name
50     description: model name as provided in ASDC design time.
51     type: string
52     short_option: i
53     long_option: model-name
54     is_optional: false
55   - name: model-version
56     description: model-version
57     type: string
58     short_option: j
59     long_option: model-version
60     is_optional: false
61   - name: customer
62     description: unique id for customer
63     type: string
64     short_option: c
65     long_option: customer
66     is_optional: false
67   - name: instance-name
68     description: service instance name
69     type: string
70     short_option: k
71     long_option: instance-name
72     is_optional: false
73   - name: supress-rollback
74     description: rollback changes if instantiation fails.
75     type: bool
76     short_option: r
77     long_option: supress-rollback
78     is_optional: true
79   - name: service-type
80     description: subscription service type
81     type: string
82     short_option: w
83     long_option: service-type
84     is_optional: false
85
86 results:
87   direction: portrait
88   attributes:
89     - name: service-id
90       description: instance id for the created service.
91       type: string
92       scope: short
93
94
95 http:
96   service:
97     name: so
98     version: v3
99     auth: basic
100     mode: direct
101   request:
102     uri: /ecomp/mso/infra/serviceInstances/v3
103     method: POST
104     body: '{"requestDetails": {"cloudConfiguration" : {"lcpCloudRegionId": "${cloud-region}","tenantId": "${tenant-id}"},"modelInfo": {"modelType": "service","modelInvariantId": "${model-invariant-id}","modelNameVersionId": "${model-uuid}","modelName": "${model-name}","modelVersion": "${model-version}"},"subscriberInfo": {"globalSubscriberId": "${customer}"},"requestInfo": {"instanceName": "${instance-name}","source": "VID","suppressRollback": "${supress-rollback}"},"requestParameters": {"subscriptionServiceType": "${service-type}"}}}'
105
106   success_codes:
107     - 202
108   result_map:
109     service-id: $b{$.requestReferences.instanceId}
110   sample_response:
111     body: '{"requestReferences":{"instanceId":"${instance-id}","requestId":"375ba428-65e7-4f2b-afb9-74735ac6bfd0"}}'