a208791cde021222030e7adfc6f107c99f1ef8ab
[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: vf-module-create
17 description: Create a VF Module
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: lcp-cloudregion-id
26     description: AIC LCP node location identifier
27     type: string
28     short_option: l
29     long_option: lcp-cloudregion-id
30     is_optional: false
31   - name: tenant-id
32     description: openstack tenant id (uuid)
33     type: string
34     short_option: w
35     long_option: tenant-id
36     is_optional: false
37   - name: vnf-instance-id
38     description: vnf instance id
39     type: string
40     short_option: y
41     long_option: vnf-instace-id
42     is_optional: false
43   - name: service-instance-id
44     description: unique id for service instance
45     type: string
46     short_option: x
47     long_option: service-instace-id
48     is_optional: false
49   - name: parenet-service-model
50     description: parent service model name
51     type: string
52     short_option: z
53     long_option: parenet-service-model
54     is_optional: false
55   - name: supress-rollback
56     description: rollback changes if instantiation fails.
57     type: bool
58     short_option: r
59     long_option: supress-rollback
60     is_optional: true
61   - name: instance-name
62     description: service instance name
63     type: string
64     short_option: i
65     long_option: instance-name
66     is_optional: false
67
68 results:
69   direction: portrait
70   attribute:
71     - name: vf-instance-id
72       description: id for the created vf
73       type: string
74       scope: short
75
76 http:
77   service:
78     name: so
79     version: v3
80     auth: basic
81     mode: direct
82   request:
83     uri: ecomp/mso/infra/serviceInstances/v2/${service-instance-id}/vnfs/${vnf-instance-id}/vfModules
84     method: PUT
85     body: '{"requestDetails":{"modelInfo":{"modelType":"vfModule","modelInvariantId":"ff5256d2-5a33-55df-13ab-12abad84e7ff","modelNameVersionId":"fe6478e5-ea33-3346-ac12-ab121484a3fe","modelName":"vSAMP12..base..module-0","modelVersion":"1"},"cloudConfiguration":{"lcpCloudRegionId":"${lcp-cloudregion-id}","tenantId":"${tenant-id}"},"requestInfo":{"instanceName":"${instance-name}","source":"VID","suppressRollback":"${supress-rollback}"},"relatedInstanceList":[{"relatedInstance":{"instanceId":"${service-instance-id}","modelInfo":{"modelType":"service","modelInvariantId":"ff3514e3-5a33-55df-13ab-12abad84e7ff","modelNameVersionId":"fe6985cd-ea33-3346-ac12-ab121484a3fe","modelName":"${parenet-service-model}","modelVersion":"1.0"}}},{"relatedInstance":{"instanceId":"${vnf-instance-id}","modelInfo":{"modelType":"vnf","modelInvariantId":"ff5256d1-5a33-55df-13ab-12abad84e7ff","modelNameVersionId":"fe6478e4-ea33-3346-ac12-ab121484a3fe","modelName":"vSAMP12","modelVersion":"1.0","modelCustomizationName":"vSAMP12 1"}}}],"requestParameters":{"userParams":[]}}}'
86
87   success_codes:
88     - 202
89   result_mpa:
90     vf-instance-id: $b{$.vfInstanceId}
91   sample_response:
92     body: '{"vfInstanceId":"234567AB"}'