1294e7c25143d34654efd7b080371979496934b8
[cli.git] /
1 # Copyright © Intel Corporation 2019\r
2 #\r
3 # Licensed under the Apache License, Version 2.0 (the "License");\r
4 # you may not use this file except in compliance with the License.\r
5 # You may obtain a copy of the License at\r
6 #\r
7 #     http://www.apache.org/licenses/LICENSE-2.0\r
8 #\r
9 # Unless required by applicable law or agreed to in writing, software\r
10 # distributed under the License is distributed on an "AS IS" BASIS,\r
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
12 # See the License for the specific language governing permissions and\r
13 # limitations under the License.\r
14 \r
15 open_cli_schema_version: 1.0\r
16 name: service-create-vcpe\r
17 description: Create a vcpe service instance using SO\r
18 \r
19 info:\r
20   product: onap-dublin\r
21   service: so\r
22   author: ONAP CLI Team onap-discuss@lists.onap.org\r
23 \r
24 parameters:\r
25 - name: cloud-region\r
26   description: cloud region identifier\r
27   type: string\r
28   short_option: l\r
29   long_option: cloud-region\r
30   is_optional: true\r
31 - name: tenant-id\r
32   description: tenant id\r
33   type: string\r
34   short_option: t\r
35   long_option: tenant-id\r
36   is_optional: true\r
37 - name: model-invariant-id\r
38   description: model invariant id generated by ASDC.\r
39   type: string\r
40   short_option: e\r
41   long_option: model-invariant-id\r
42   is_optional: false\r
43 - name: model-uuid\r
44   description: model uuid generated by ASDC.\r
45   type: string\r
46   short_option: g\r
47   long_option: model-uuid\r
48   is_optional: false\r
49 - name: model-name\r
50   description: model name as provided in ASDC design time.\r
51   type: string\r
52   short_option: i\r
53   long_option: model-name\r
54   is_optional: false\r
55 - name: model-version\r
56   description: model-version\r
57   type: string\r
58   short_option: j\r
59   long_option: model-version\r
60   is_optional: false\r
61 - name: model-version-id\r
62   description: model-version-id\r
63   type: string\r
64   short_option: n\r
65   long_option: model-version-id\r
66   is_optional: false\r
67 - name: customer\r
68   description: unique id for customer\r
69   type: string\r
70   short_option: c\r
71   long_option: customer\r
72   is_optional: false\r
73 - name: requestor-id\r
74   description: requestor ID\r
75   type: string\r
76   short_option: q\r
77   long_option: requestor-id\r
78   is_optional: false\r
79 - name: instance-name\r
80   description: service instance name\r
81   type: string\r
82   short_option: k\r
83   long_option: instance-name\r
84   is_optional: false\r
85 - name: supress-rollback\r
86   description: rollback changes if instantiation fails.\r
87   type: bool\r
88   short_option: r\r
89   long_option: supress-rollback\r
90   is_optional: true\r
91 - name: brg-wan-mac-address\r
92   description: BRG_WAN_MAC_Address\r
93   type: string\r
94   short_option: b\r
95   long_option: brg-wan-mac-address\r
96   is_optional: false\r
97 - name: customer-latitude\r
98   description: customer latitude, part of customer location\r
99   type: string\r
100   short_option: f\r
101   long_option: customer-latitude\r
102   is_optional: true\r
103 - name: customer-longitude\r
104   description: customer longitude, part of customer location\r
105   type: string\r
106   short_option: d\r
107   long_option: customer-longitude\r
108   is_optional: true\r
109 - name: customer-name\r
110   description: customer name, part of customer location\r
111   type: string\r
112   short_option: y\r
113   long_option: customer-name\r
114   is_optional: true\r
115 - name: homing-solution\r
116   description: homing solution to use [oof|sniro]\r
117   type: string\r
118   short_option: h\r
119   long_option: homing-solution\r
120   is_optional: true\r
121 - name: orchestrator\r
122   description: orchestrator to use [multicloud|openstack(default)]\r
123   type: string\r
124   short_option: o\r
125   long_option: orchestrator\r
126   is_optional: true\r
127 - name: api\r
128   description: api to use [GR_API|VNF_API]\r
129   type: string\r
130   short_option: p\r
131   long_option: api\r
132   is_optional: true\r
133   default_value: VNF_API\r
134 - name: subscriber-name\r
135   description: subscriber name\r
136   type: string\r
137   short_option: s\r
138   long_option: subscriber-name\r
139   is_optional: true\r
140 - name: project-name\r
141   description: project name\r
142   type: string\r
143   short_option: x\r
144   long_option: project-name\r
145   is_optional: true\r
146 - name: owning-entity-id\r
147   description: owning entity id\r
148   type: string\r
149   short_option: z\r
150   long_option: owning-entity-id\r
151   is_optional: true\r
152 - name: owning-entity-name\r
153   description: owning entity name\r
154   type: string\r
155   short_option: m\r
156   long_option: owning-entity-name\r
157   is_optional: true\r
158 \r
159 results:\r
160   direction: portrait\r
161   attributes:\r
162   - name: service-id\r
163     description: instance id for the created service.\r
164     type: string\r
165     scope: short\r
166 \r
167 \r
168 http:\r
169   service:\r
170     name: so\r
171     version: v6\r
172     auth: basic\r
173     mode: direct\r
174   request:\r
175     uri: /onap/so/infra/serviceInstances/v6\r
176     method: POST\r
177     body: '{\r
178               "requestDetails":{\r
179                  "cloudConfiguration":{\r
180                     "lcpCloudRegionId":"${cloud-region}",\r
181                     "tenantId":"${tenant-id}"\r
182                  },\r
183                  "modelInfo":{\r
184                     "modelType":"service",\r
185                     "modelInvariantId":"${model-invariant-id}",\r
186                     "modelNameVersionId":"${model-uuid}",\r
187                     "modelName":"${model-name}",\r
188                     "modelVersion":"${model-version}",\r
189                     "modelVersionId":"${model-version-id}"\r
190                  },\r
191                  "subscriberInfo":{\r
192                     "globalSubscriberId":"${customer}",\r
193                     "subscriberName":"${subscriber-name}"\r
194                  },\r
195                  "requestInfo":{\r
196                     "requestorId":"${requestor-id}",\r
197                     "instanceName":"${instance-name}",\r
198                     "source":"CLI",\r
199                     "suppressRollback":"${supress-rollback}"\r
200                  },\r
201                  "requestParameters":{\r
202                     "subscriptionServiceType":"vCPE",\r
203                     "aLaCarte":"false",\r
204                     "testApi":"${api}",\r
205                     "userParams":[\r
206                        {\r
207                           "name":"BRG_WAN_MAC_Address",\r
208                           "value":"${brg-wan-mac-address}"\r
209                        },\r
210                        {\r
211                           "name":"Customer_Location",\r
212                           "value":{\r
213                              "customerLatitude":"${customer-latitude}",\r
214                              "customerLongitude":"${customer-longitude}",\r
215                              "customerName":"${customer-name}"\r
216                           }\r
217                        },\r
218                        {\r
219                           "name":"Homing_Solution",\r
220                           "value":"${homing-solution}"\r
221                        },\r
222                        {\r
223                           "name":"orchestrator",\r
224                           "value":"${orchestrator}"\r
225                        }\r
226                     ]\r
227                  },\r
228                  "project":{\r
229                     "projectName":"${project-name}"\r
230                  },\r
231                  "owningEntity":{\r
232                     "owningEntityId":"${owning-entity-id}",\r
233                     "owningEntityName":"${owning-entity-name}"\r
234                  }\r
235               }\r
236            }'\r
237   success_codes:\r
238   - 202\r
239   result_map:\r
240     service-id: $b{$.requestReferences.instanceId}\r
241   sample_response:\r
242     body: '{\r
243               "requestReferences":{\r
244                  "instanceId":"${instance-id}",\r
245                  "requestId":"375ba428-65e7-4f2b-afb9-74735ac6bfd0"\r
246               }\r
247            }'\r