eac89b5370d83b9d9be96a1c07ce14308608be7b
[cli.git] / products / onap-beijing / features / so / src / main / resources / open-cli-schema / services / vf-create-schema-beijing.yaml
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-create
17 description: Create a VF
18 info:
19   product: onap-beijing
20   service: so
21   author: ONAP CLI Team onap-discuss@lists.onap.org
22
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: openstack tenant id
33     type: string
34     short_option: z
35     long_option: tenant-id
36     is_optional: false
37   - name: product-family
38     description: service type for serivce (e.g. vLB)
39     type: string
40     short_option: w
41     long_option: product-family
42     is_optional: false
43   - name: instance-name
44     description: service instance name
45     type: string
46     short_option: o
47     long_option: instance-name
48     is_optional: false
49   - name: service-instance-id
50     description: unique id for service instance
51     type: string
52     short_option: y
53     long_option: service-instance-id
54     is_optional: false
55   - name: vf-model-invariant-id
56     description: vf model invariant id
57     type: string
58     short_option: b
59     long_option: vf-model-invariant-id
60     is_optional: false
61   - name: vf-model-uuid
62     description: model uuid for vf
63     type: string
64     short_option: c
65     long_option: vf-model-uuid
66     is_optional: false
67   - name: vf-model-name
68     description: vf model name
69     type: string
70     short_option: e
71     long_option: vf-model-name
72     is_optional: false
73   - name: vf-model-version
74     description: vf model version
75     type: string
76     short_option: g
77     long_option: vf-model-version
78     is_optional: false
79   - name: vf-model-customization-id
80     description: vf model customization id
81     type: string
82     short_option: i
83     long_option: vf-model-customization-id
84     is_optional: false
85   - name: service-model-invariant-id
86     description: model invariant id
87     type: string
88     short_option: j
89     long_option: service-model-invariant-id
90     is_optional: false
91   - name: service-model-uuid
92     description: model name version id
93     type: string
94     short_option: k
95     long_option: service-model-uuid
96     is_optional: false
97   - name: service-model-name
98     description: service model name
99     type: string
100     short_option: q
101     long_option: service-model-name
102     is_optional: false
103   - name: service-model-version
104     description: service model version
105     type: string
106     short_option: n
107     long_option: service-model-version
108     is_optional: false
109
110
111 results:
112   direction: portrait
113   attributes:
114     - name: vf-id
115       description: id for the created vnf
116       type: string
117       scope: short
118
119 http:
120   service:
121     name: so
122     version: v4
123     auth: basic
124     mode: direct
125   request:
126     uri: /ecomp/mso/infra/serviceInstances/v4/${service-instance-id}/vnfs
127     method: POST
128     body: '{"requestDetails": {"modelInfo": {"modelType": "vnf","modelInvariantId": "${vf-model-invariant-id}","modelVersionId": "${vf-model-uuid}","modelName": "${vf-model-name}","modelVersion": "${vf-model-version}","modelCustomizationId": "${vf-model-customization-id}"},"cloudConfiguration": {"lcpCloudRegionId": "${cloud-region}","tenantId": "${tenant-id}"},"requestInfo": {"instanceName": "${instance-name}","source": "VID","productFamilyId": "${product-family}" },"relatedInstanceList": [{"relatedInstance": {"instanceId": "${service-instance-id}","modelInfo": {"modelType": "service","modelInvariantId": "${service-model-invariant-id}","modelVersionId": "${service-model-uuid}","modelName": "${service-model-name}","modelVersion": "${service-model-version}"}}}],"requestParameters": {}}}'
129
130   success_codes:
131     - 202
132   result_map:
133     vf-id: $b{$.requestReferences.instanceId}
134   sample_response:
135     body: '{"requestReferences": {"instanceId": "2a152730-f6eb-4dc6-9b81-7a6f6f263d71","requestId": "6402628f-7f67-4605-9e60-0d8632616d02"}}'