1 # Copyright 2018 Huawei Technologies Co., Ltd.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 open_cli_schema_version: 1.0
17 description: Create a service instance using MSO
22 author: ONAP CLI Team onap-discuss@lists.onap.org
26 description: cloud region identifier
29 long_option: cloud-region
32 description: tenant id
35 long_option: tenant-id
37 - name: model-invariant-id
38 description: model invariant id generated by ASDC.
41 long_option: model-invariant-id
44 description: model uuid generated by ASDC.
47 long_option: model-uuid
50 description: model name as provided in ASDC design time.
53 long_option: model-name
56 description: model-version
59 long_option: model-version
62 description: unique id for customer
68 description: service instance name
71 long_option: instance-name
73 - name: supress-rollback
74 description: rollback changes if instantiation fails.
77 long_option: supress-rollback
80 description: subscription service type
83 long_option: service-type
90 description: instance id for the created service.
102 uri: /ecomp/mso/infra/serviceInstances/v4
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}"}}}'
109 service-id: $b{$.requestReferences.instanceId}
111 body: '{"requestReferences":{"instanceId":"${instance-id}","requestId":"375ba428-65e7-4f2b-afb9-74735ac6bfd0"}}'