0755729d4d72db1413c56de01319a6422461abb8
[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\r
17 description: Create a service instance using SO\r
18 \r
19 info:\r
20   product: onap-elalto\r
21   service: so\r
22   author: ONAP CLI Team onap-discuss@lists.onap.org\r
23 \r
24 parameters:\r
25   - name: model-invariant-id\r
26     description: model invariant id generated by ASDC.\r
27     type: string\r
28     short_option: e\r
29     long_option: model-invariant-id\r
30     is_optional: false\r
31   - name: model-uuid\r
32     description: model uuid generated by ASDC.\r
33     type: string\r
34     short_option: g\r
35     long_option: model-uuid\r
36     is_optional: false\r
37   - name: model-name\r
38     description: model name as provided in ASDC design time.\r
39     type: string\r
40     short_option: i\r
41     long_option: model-name\r
42     is_optional: false\r
43   - name: model-version\r
44     description: model-version\r
45     type: string\r
46     short_option: j\r
47     long_option: model-version\r
48     is_optional: false\r
49   - name: model-version-id\r
50     description: model-version-id\r
51     type: string\r
52     short_option: n\r
53     long_option: model-version-id\r
54     is_optional: false\r
55   - name: customer\r
56     description: unique id for customer\r
57     type: string\r
58     short_option: c\r
59     long_option: customer\r
60     is_optional: false\r
61   - name: requestor-id\r
62     description: requestor ID\r
63     type: string\r
64     short_option: q\r
65     long_option: requestor-id\r
66     is_optional: false\r
67   - name: instance-name\r
68     description: service instance name\r
69     type: string\r
70     short_option: k\r
71     long_option: instance-name\r
72     is_optional: false\r
73   - name: supress-rollback\r
74     description: rollback changes if instantiation fails.\r
75     type: bool\r
76     short_option: r\r
77     long_option: supress-rollback\r
78     is_optional: true\r
79   - name: service-type\r
80     description: subscription service type\r
81     type: string\r
82     short_option: w\r
83     long_option: service-type\r
84     is_optional: false\r
85   - name: ala-carte\r
86     description: ala carte flag, defaults to true\r
87     type: string\r
88     short_option: A\r
89     long_option: ala-carte\r
90     is_optional: true\r
91     default_value: true\r
92   - name: customer-latitude\r
93     description: customer latitude, part of customer location\r
94     type: string\r
95     short_option: la\r
96     long_option: customer-latitude\r
97     is_optional: true\r
98   - name: customer-longitude\r
99     description: customer longitude, part of customer location\r
100     type: string\r
101     short_option: lo\r
102     long_option: customer-longitude\r
103     is_optional: true\r
104   - name: customer-name\r
105     description: customer name, part of customer location\r
106     type: string\r
107     short_option: y\r
108     long_option: customer-name\r
109     is_optional: true\r
110   - name: homing-solution\r
111     description: homing solution to use [oof|sniro]\r
112     type: string\r
113     short_option: H\r
114     long_option: homing-solution\r
115     is_optional: true\r
116   - name: orchestrator\r
117     description: orchestrator to use [multicloud|openstack(default)]\r
118     type: string\r
119     short_option: o\r
120     long_option: orchestrator\r
121     is_optional: true\r
122   - name: api\r
123     description: api to use [GR_API|VNF_API]\r
124     type: string\r
125     short_option: P\r
126     long_option: api\r
127     is_optional: true\r
128     default_value: GR_API\r
129   - name: subscriber-name\r
130     description: subscriber name\r
131     type: string\r
132     short_option: S\r
133     long_option: subscriber-name\r
134     is_optional: true\r
135   - name: project-name\r
136     description: project name\r
137     type: string\r
138     short_option: x\r
139     long_option: project-name\r
140     is_optional: true\r
141   - name: owning-entity-id\r
142     description: owning entity id\r
143     type: string\r
144     short_option: z\r
145     long_option: owning-entity-id\r
146     is_optional: true\r
147   - name: owning-entity-name\r
148     description: owning entity name\r
149     type: string\r
150     short_option: O\r
151     long_option: owning-entity-name\r
152     is_optional: true\r
153 \r
154 results:\r
155   direction: portrait\r
156   attributes:\r
157     - name: service-id\r
158       description: instance id for the created service.\r
159       type: string\r
160       scope: short\r
161 http:\r
162   service:\r
163     name: so\r
164     version: v6\r
165     auth: basic\r
166     mode: direct\r
167   request:\r
168     uri: /onap/so/infra/serviceInstantiation/v7/serviceInstances\r
169     method: POST\r
170     body: '{\r
171               "requestDetails":{\r
172                  "modelInfo":{\r
173                     "modelType":"service",\r
174                     "modelInvariantId":"${model-invariant-id}",\r
175                     "modelUuid":"${model-uuid}",\r
176                     "modelName":"${model-name}",\r
177                     "modelVersion":"${model-version}",\r
178                     "modelVersionId":"${model-version-id}",\r
179                     "modelInvariantUuid" : "${model-invariant-id}"\r
180                  },\r
181                  "subscriberInfo":{\r
182                     "globalSubscriberId":"${customer}",\r
183                     "subscriberName":"${subscriber-name}"\r
184                  },\r
185                  "requestInfo":{\r
186                     "requestorId":"${requestor-id}",\r
187                     "instanceName":"${instance-name}",\r
188                     "source":"CLI",\r
189                     "suppressRollback":"${supress-rollback}"\r
190                  },\r
191                  "requestParameters":{\r
192                     "subscriptionServiceType":"${service-type}",\r
193                     "aLaCarte":"${ala-carte}",\r
194                     "testApi":"${api}",\r
195                     "userParams":[\r
196                        {\r
197                           "name":"Customer_Location",\r
198                           "value":{\r
199                              "customerLatitude":"${customer-latitude}",\r
200                              "customerLongitude":"${customer-longitude}",\r
201                              "customerName":"${customer-name}"\r
202                           }\r
203                        },\r
204                        {\r
205                           "name":"Homing_Solution",\r
206                           "value":"${homing-solution}"\r
207                        },\r
208                        {\r
209                           "name":"orchestrator",\r
210                           "value":"${orchestrator}"\r
211                        }\r
212                     ]\r
213                  },\r
214                  "project":{\r
215                     "projectName":"${project-name}"\r
216                  },\r
217                  "owningEntity":{\r
218                     "owningEntityId":"${owning-entity-id}",\r
219                     "owningEntityName":"${owning-entity-name}"\r
220                  }\r
221               }\r
222            }'\r
223 \r
224   success_codes:\r
225     - 202\r
226   result_map:\r
227     service-id: $b{$.requestReferences.instanceId}\r
228   sample_response:\r
229     body: '{\r
230               "requestReferences":{\r
231                  "instanceId":"${instance-id}",\r
232                  "requestId":"375ba428-65e7-4f2b-afb9-74735ac6bfd0"\r
233               }\r
234            }'\r