blob: a40df2738341f2d7c5668fd4f7a620f688a0f76d [file] [log] [blame]
Ayumu Ueha43821df2023-04-07 13:16:50 +00001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3
4
5How to deploy VNF Deployment (V2 API)
6=====================================
7
8This user guide shows how to deploy VNF (Virtualized Network Function) via Tacker.
Ayumu Uehac12629c2023-04-14 06:19:14 +00009See the `ETSI NFV-SOL VNF Deployment`_ for the original procedure.
10
11.. note::
12
13 This document focuses on some operations. See the Tacker `Use Case Guide`_ or `API Reference`_ for other operations.
Ayumu Ueha43821df2023-04-07 13:16:50 +000014
15.. contents::
16 :depth: 3
17 :local:
18
19Prerequisites
20-------------
21
Ayumu Uehac12629c2023-04-14 06:19:14 +000022Credentials Setting
23~~~~~~~~~~~~~~~~~~~
24
25To use Tacker CLI, you need to configure the credentials, please change the ``username`` and ``projectname`` to be executed according to your environment.
26
27.. code:: bash
28
29 $ source ${devstack_dir}/openrc admin admin
30
31If you want to access Tacker via API, you need to get auth token by following procedure below.
32
33.. code:: bash
34
35 # Create request body for issuing access token.
36 $ vi get_token.json
37 $ cat get_token.json
38 {
39 "auth": {
40 "identity": {
41 "methods": ["password"],
42 "password": {
43 "user": {
44 "domain": {
45 "name": "Default"
46 },
47 "name": "admin",
48 "password": "devstack"
49 }
50 }
51 },
52 "scope": {
53 "project": {
54 "domain": {
55 "name":"Default"
56 },
57 "name":"admin"
58 }
59 }
60 }
61 }
62
63 # Issue auth token for accessing via API.
64 $ curl -i -X POST -H "Content-Type: application/json" -d @./get_token.json http://192.168.121.170/identity/v3/auth/tokens
65 HTTP/1.1 201 CREATED
66 Date: Wed, 12 Apr 2023 07:22:44 GMT
67 Server: Apache/2.4.41 (Ubuntu)
68 Content-Type: application/json
69 Content-Length: 7469
70 X-Subject-Token: gAAAAABkNlxENR1WGpfgAe8g2Z4z5lCtwCsfUs5GTsg9mvYTMbG7S8HPIZep0vAGUnoPTj0_IYgMP-W1Y0vCDmWFQH7CSq1XWv3qNMd4aFnclk5sHuP1s0JtHSls7IQMM6zbn-FBYUSWTc9d783OSxYKXWqf3qo-CfFjPwrkmNzfkzgtlogkeA4
71 Vary: X-Auth-Token
72 x-openstack-request-id: req-e94aa763-9578-424b-affb-7ccab80db72c
73 Connection: close
74
75 {"token": {"methods": ["password"], "user": {"domain": {"id": "default", "name": "Default"}, "id": "3e2f3db203e347bfa2197f8fdd038f39", "name": "admin", "password_expires_at": null}, "audit_ids": ["1pgGosVvR4azhw29woKvDw"], "expires_at": "2023-04-12T08:22:44.000000Z", "issued_at": "2023-04-12T07:22:44.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "5af8bd4dd4ed4285ab1d45a95833cc67", "name": "admin"}, "is_domain": false, "roles": [{"id": "a039c220711049e0b77eac89a1504a81", "name": "reader"}, {"id": "57051bcc1fc24eb4875852a8ab32eae7", "name": "member"}, {"id": "029ea703a2534199a412b18cc5bfa31d", "name": "admin"}], "catalog": [{"endpoints": [{"id": "29307c3ec2f94553acbd7682e32602ba", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170:8989/v2", "region": "RegionOne"}, {"id": "45e5c5f2d4ce4841a980e29e6d3713f7", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170:8989/v2", "region": "RegionOne"}, {"id": "8d79900575e3490cb71ad6fe5ff0697c", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170:8989/v2", "region": "RegionOne"}], "id": "00c00313624d4c74aeaa55285e2c553d", "type": "workflowv2", "name": "mistral"}, {"endpoints": [{"id": "aafc7809d8a943d39d20490442ed87fa", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/compute/v2/5af8bd4dd4ed4285ab1d45a95833cc67", "region": "RegionOne"}], "id": "131f57b38d7e4874a18446ab50f3f37b", "type": "compute_legacy", "name": "nova_legacy"}, {"endpoints": [{"id": "e1cd2199468a4486a4df2ffe884b9026", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170:12347/v1", "region": "RegionOne"}], "id": "4dc58229363a4e5fa3d863357554678b", "type": "maintenance", "name": "fenix"}, {"endpoints": [], "id": "53b114aa4c2b4cf7b642ef99e767e58c", "type": "kuryr-kubernetes", "name": "kuryr-kubernetes"}, {"endpoints": [{"id": "1156b12e11a04ac2ab4a674976e8bb3e", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170/metric", "region": "RegionOne"}, {"id": "191a35e87d824e72819c28790d6dac8d", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170/metric", "region": "RegionOne"}, {"id": "99016e127b7d4f8483636f5531d994c9", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/metric", "region": "RegionOne"}], "id": "5d483e864b484f76a46266dc5640386b", "type": "metric", "name": "gnocchi"}, {"endpoints": [{"id": "d5ce793eee434288901795720538f811", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/volume/v3/5af8bd4dd4ed4285ab1d45a95833cc67", "region": "RegionOne"}], "id": "5e5f3dc6efa545569f67f453a05ac234", "type": "block-storage", "name": "cinder"}, {"endpoints": [{"id": "6ed501fde45047fe9a3684cc791df953", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/load-balancer", "region": "RegionOne"}], "id": "8b06952a46f3448f9e88daccee3212a9", "type": "load-balancer", "name": "octavia"}, {"endpoints": [{"id": "548133af931b4c0ea8d015dbb67d4388", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170/identity", "region": "RegionOne"}, {"id": "58f0b35802f442f4997318017a37cae9", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170/identity", "region": "RegionOne"}, {"id": "c062a6ce0ab54ee699b863b38e15c50a", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/identity", "region": "RegionOne"}], "id": "8ee29bc9aa6d4ddda69f7810b0c52ff5", "type": "identity", "name": "keystone"}, {"endpoints": [{"id": "7fdd1dac28874280928e6c9313b4a415", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/heat-api-cfn/v1", "region": "RegionOne"}], "id": "9605cce5cdad422f8934c891ac840fa7", "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"id": "53ed393173944da3bfac9d482907b65e", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170:9890/", "region": "RegionOne"}, {"id": "d6891cda1327453aa28155fd18e8596e", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170:9890/", "region": "RegionOne"}, {"id": "fef7c489ad544e708d9c85e4a801e344", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170:9890/", "region": "RegionOne"}], "id": "a2c67888fc7a4f55a4001cd807293daf", "type": "nfv-orchestration", "name": "tacker"}, {"endpoints": [{"id": "413321647af94f2fb948e59c76bc2b87", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/placement", "region": "RegionOne"}], "id": "aa649b2a9f8644a184fd6857400328ab", "type": "placement", "name": "placement"}, {"endpoints": [{"id": "671a41088c4841d18c58db9ac8a97314", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170:9696/networking", "region": "RegionOne"}], "id": "b1abe9867d07457dbc7c84f37906300a", "type": "network", "name": "neutron"}, {"endpoints": [{"id": "ba3d670defb748a1b23a4697a7998fb7", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/volume/v3/5af8bd4dd4ed4285ab1d45a95833cc67", "region": "RegionOne"}], "id": "b481211f6e5742f1913148ab157259ee", "type": "volumev3", "name": "cinderv3"}, {"endpoints": [{"id": "7eca8bcad7df40cda721a960a838f908", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/heat-api/v1/5af8bd4dd4ed4285ab1d45a95833cc67", "region": "RegionOne"}], "id": "c7c437d0564f428db112516273ca2c0b", "type": "orchestration", "name": "heat"}, {"endpoints": [{"id": "2be3a59b29c04cf7a359ec8b973d334a", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170/key-manager", "region": "RegionOne"}, {"id": "4258ac8e29084b5a82a48e55b2189284", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170/key-manager", "region": "RegionOne"}, {"id": "d463ed0ea12a4b44974b9239d2c14a49", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/key-manager", "region": "RegionOne"}], "id": "d411db3bd28a44f7b7c0ae53d3f5bb7b", "type": "key-manager", "name": "barbican"}, {"endpoints": [{"id": "05dea080ccc8493b9aa6a22bfe9d7b2b", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/compute/v2.1", "region": "RegionOne"}], "id": "d69f1f3988ee4809a9bb496f4f312bbd", "type": "compute", "name": "nova"}, {"endpoints": [{"id": "86e8d9e1998b4b9caf503dc58fc1297a", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/reservation/v1", "region": "RegionOne"}], "id": "d81b4911762a4c419f3816c36adcdac1", "type": "reservation", "name": "blazar"}, {"endpoints": [{"id": "0b0195a6580d48bf94eed97a35603756", "interface": "admin", "region_id": "RegionOne", "url": "http://192.168.121.170:8042", "region": "RegionOne"}, {"id": "67d676a732bb4c67abcdc5f433e5b3aa", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170:8042", "region": "RegionOne"}, {"id": "f753f73beed8463fa3f594c29911c332", "interface": "internal", "region_id": "RegionOne", "url": "http://192.168.121.170:8042", "region": "RegionOne"}], "id": "ddd00c0c78b448438bb925776fdbb350", "type": "alarming", "name": "aodh"}, {"endpoints": [{"id": "a39c85e31b3446239f958cc96c634216", "interface": "public", "region_id": "RegionOne", "url": "http://192.168.121.170/image", "region": "RegionOne"}], "id": "fe0a0e3590fa4fa69f395bcdc47f1241", "type": "image", "name": "glance"}]}}
76
77 # Set ``X-Subject-Token`` to environment variables as ``TOKEN``.
78 $ TOKEN=gAAAAABkNlxENR1WGpfgAe8g2Z4z5lCtwCsfUs5GTsg9mvYTMbG7S8HPIZep0vAGUnoPTj0_IYgMP-W1Y0vCDmWFQH7CSq1XWv3qNMd4aFnclk5sHuP1s0JtHSls7IQMM6zbn-FBYUSWTc9d783OSxYKXWqf3qo-CfFjPwrkmNzfkzgtlogkeA4
79
80
Ayumu Ueha43821df2023-04-07 13:16:50 +000081VNF Package
82~~~~~~~~~~~
83Create and upload the VNF Package that you want to deploy by following procedure below.
84
851. Prepare VNF Package.
86 The sample VNF Package used in this guide is stored in ``o2/tacker/samples/packages/vnf_v2`` directory.
87
88 .. code:: bash
89
90 $ git clone https://gerrit.o-ran-sc.org/r/smo/o2
91 $ cd o2/tacker/samples/packages/vnf_v2
92 $ ls
93 BaseHOT Definitions input_param.json Scripts TOSCA-Metadata
94
95 $ zip sample_vnf_package_v2.zip -r BaseHOT/ Definitions/ Scripts/ TOSCA-Metadata/
96
97
98 About details to prepare VNF Package, please refer to `Prepare VNF Package`_.
99
1002. Create and Upload VNF Package.
101
Ayumu Uehac12629c2023-04-14 06:19:14 +0000102 * via CLI command:
Ayumu Ueha43821df2023-04-07 13:16:50 +0000103
Ayumu Uehac12629c2023-04-14 06:19:14 +0000104 .. code:: bash
105
106 $ openstack vnf package create
107 +-------------------+-------------------------------------------------------------------------------------------------+
108 | Field | Value |
109 +-------------------+-------------------------------------------------------------------------------------------------+
110 | ID | 18e7b0ec-d006-4b84-8bc5-84f85cfbfff9 |
111 | Links | { |
112 | | "self": { |
113 | | "href": "/vnfpkgm/v1/vnf_packages/18e7b0ec-d006-4b84-8bc5-84f85cfbfff9" |
114 | | }, |
115 | | "packageContent": { |
116 | | "href": "/vnfpkgm/v1/vnf_packages/18e7b0ec-d006-4b84-8bc5-84f85cfbfff9/package_content" |
117 | | } |
118 | | } |
119 | Onboarding State | CREATED |
120 | Operational State | DISABLED |
121 | Usage State | NOT_IN_USE |
122 | User Defined Data | {} |
123 +-------------------+-------------------------------------------------------------------------------------------------+
Ayumu Ueha43821df2023-04-07 13:16:50 +0000124
125
Ayumu Uehac12629c2023-04-14 06:19:14 +0000126 $ openstack vnf package upload --path sample_vnf_package_v2.zip 18e7b0ec-d006-4b84-8bc5-84f85cfbfff9
127 Upload request for VNF package 18e7b0ec-d006-4b84-8bc5-84f85cfbfff9 has been accepted.
128
129 * via API:
130
131 .. code:: bash
132
133 $ TACKER_ENDPOINT=http://192.168.121.170:9890
134 $ VNFP_ID=$(curl -s -X POST ${TACKER_ENDPOINT}/vnfpkgm/v1/vnf_packages \
135 -H "Content-type: application/json" -H "X-Auth-Token:$TOKEN" -d '{}' | jq -r '.id')
136
137 $ VNFP_CONTENTS=./sample_vnf_package_v2.zip
138
139 $ curl -i -X PUT ${TACKER_ENDPOINT}/vnfpkgm/v1/vnf_packages/$VNFP_ID/package_content \
140 -H "Content-type: application/zip" -H "X-Auth-Token:$TOKEN" -H "Accept:application/zip" \
141 -F vnf_package_content=@${VNFP_CONTENTS}
142
Ayumu Ueha43821df2023-04-07 13:16:50 +0000143
144Deployment Procedure
145--------------------
146
Ayumu Ueha43821df2023-04-07 13:16:50 +0000147Create
148~~~~~~
149Create a VNF Instance by specifying the VNFD ID. The VNFD ID is the value defined in the VNFD file and can be found in the :command:`openstack vnf package show` command.
150
Ayumu Uehac12629c2023-04-14 06:19:14 +0000151* via CLI command:
Ayumu Ueha43821df2023-04-07 13:16:50 +0000152
Ayumu Uehac12629c2023-04-14 06:19:14 +0000153 .. code:: bash
154
155 $ openstack vnflcm create e9214953-47d5-45bd-91d1-502accfbe967 --os-tacker-api-version 2
156 +-----------------------------+------------------------------------------------------------------------------------------------------------------+
157 | Field | Value |
158 +-----------------------------+------------------------------------------------------------------------------------------------------------------+
159 | ID | ae844932-730a-4063-ad1d-7e3f7f9d82d1 |
160 | Instantiation State | NOT_INSTANTIATED |
161 | Links | { |
162 | | "self": { |
163 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1" |
164 | | }, |
165 | | "instantiate": { |
166 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1/instantiate" |
167 | | } |
168 | | } |
169 | VNF Configurable Properties | |
170 | VNF Instance Description | |
171 | VNF Instance Name | |
172 | VNF Product Name | Sample VNF |
173 | VNF Provider | Company |
174 | VNF Software Version | 1.0 |
175 | VNFD ID | e9214953-47d5-45bd-91d1-502accfbe967 |
176 | VNFD Version | 1.0 |
177 +-----------------------------+------------------------------------------------------------------------------------------------------------------+
178
179* via API:
180
181 .. code:: bash
182
183 $ VNFD_ID=$(curl -s -X GET ${TACKER_ENDPOINT}/vnfpkgm/v1/vnf_packages/$VNFP_ID \
184 -H "X-Auth-Token:$TOKEN" | jq -r '.vnfdId')
185
186 $ VNF_INST_ID=$(curl -sS -X POST ${TACKER_ENDPOINT}/vnflcm/v2/vnf_instances \
187 -H "Content-type: application/json" -H "X-Auth-Token:$TOKEN" -H "Version: 2.0.0" \
188 -d '{ "vnfdId": "'$VNFD_ID'"}' | jq -r '.id')
Ayumu Ueha43821df2023-04-07 13:16:50 +0000189
190Instantiate
191~~~~~~~~~~~
192Instantiate a VNF by specifying the ID of the created VNF Instance and a file path of input parameters.
193V2 API allows you to insert VIM connection information directly into the instantiate input parameters.
194
195.. note::
196 Please change the parameters in ``input_param.json`` to suit your environment.
197
198.. code:: bash
199
200 $ cat input_param.json
201 {
202 "flavourId": "simple",
203 "vimConnectionInfo": {
204 "vim1": {
205 "accessInfo": {
206 "username": "admin",
207 "password": "devstack",
208 "project": "admin",
209 "projectDomain": "Default",
210 "region": "RegionOne",
211 "userDomain": "Default"
212 },
213 "interfaceInfo": {
214 "endpoint": "http://192.168.121.170/identity"
215 },
216 "vimId": "defb2f96-5670-4bef-8036-27bf61267fc1",
217 "vimType": "ETSINFV.OPENSTACK_KEYSTONE.V_3"
218 }
219 }
220 }
221
Ayumu Uehac12629c2023-04-14 06:19:14 +0000222
223* via CLI command:
224
225 .. code:: bash
226
227 $ openstack vnflcm instantiate ae844932-730a-4063-ad1d-7e3f7f9d82d1 input_param.json --os-tacker-api-version 2
228 Instantiate request for VNF Instance ae844932-730a-4063-ad1d-7e3f7f9d82d1 has been accepted.
229
230* via API:
231
232 .. code:: bash
233
234 $ curl -i -X POST ${TACKER_ENDPOINT}/vnflcm/v2/vnf_instances/$VNF_INST_ID/instantiate \
235 -H "Content-type: application/json" -H "X-Auth-Token:$TOKEN" -H "Version: 2.0.0" \
236 -d @./input_param.json
Ayumu Ueha43821df2023-04-07 13:16:50 +0000237
238You can verify that the deployment was successful in the following ways:
239
2401. Verify that the VNF Instance displayed by :command:`openstack vnflcm show` command is as follows:
241
242 * ``Instantiation State`` became ``INSTANTIATED``.
243 * Deployed resource information is stored in ``vnfcResourceInfo`` of ``Instantiated Vnf Info``.
244
Ayumu Uehac12629c2023-04-14 06:19:14 +0000245 * via CLI command:
Ayumu Ueha43821df2023-04-07 13:16:50 +0000246
Ayumu Uehac12629c2023-04-14 06:19:14 +0000247 .. code:: bash
248
249 $ openstack vnflcm show ae844932-730a-4063-ad1d-7e3f7f9d82d1 --os-tacker-api-version 2
250 +-----------------------------+----------------------------------------------------------------------------------------------------------------------+
251 | Field | Value |
252 +-----------------------------+----------------------------------------------------------------------------------------------------------------------+
253 | ID | ae844932-730a-4063-ad1d-7e3f7f9d82d1 |
254 | Instantiated Vnf Info | { |
255 | | "flavourId": "simple", |
256 | | "vnfState": "STARTED", |
257 | | "scaleStatus": [ |
258 | | { |
259 | | "aspectId": "VDU1_scale", |
260 | | "scaleLevel": 0 |
261 | | } |
262 | | ], |
263 | | "maxScaleLevels": [ |
264 | | { |
265 | | "aspectId": "VDU1_scale", |
266 | | "scaleLevel": 2 |
267 | | } |
268 | | ], |
269 | | "vnfcResourceInfo": [ |
270 | | { |
271 | | "id": "5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
272 | | "vduId": "VDU1", |
273 | | "computeResource": { |
274 | | "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
275 | | "resourceId": "5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
276 | | "vimLevelResourceType": "OS::Nova::Server" |
277 | | }, |
278 | | "vnfcCpInfo": [ |
279 | | { |
280 | | "id": "VDU1_CP1-5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
281 | | "cpdId": "VDU1_CP1", |
282 | | "vnfLinkPortId": "09a8a6ab-9a43-4d3a-9cf8-92b18dd74d17" |
283 | | } |
284 | | ], |
285 | | "metadata": { |
286 | | "creation_time": "2023-04-07T09:49:22Z", |
287 | | "stack_id": "vnf-ae844932-730a-4063-ad1d-7e3f7f9d82d1-VDU1_scale_group-4qhp7z3cangj-mc4dbvvk73vc- |
288 | | edjhilnlkdww/de2707cf-f222-4c97-9c29-33404a50df94", |
289 | | "parent_stack_id": "vnf- |
290 | | ae844932-730a-4063-ad1d-7e3f7f9d82d1-VDU1_scale_group-4qhp7z3cangj/3eecd59f-5476-47f5-8135-62debac7499b", |
291 | | "parent_resource_name": "mc4dbvvk73vc", |
292 | | "flavor": "m1.tiny", |
293 | | "image-VDU1": "cirros-0.5.2-x86_64-disk" |
294 | | } |
295 | | }, |
296 | | { |
297 | | "id": "9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
298 | | "vduId": "VDU2", |
299 | | "computeResource": { |
300 | | "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
301 | | "resourceId": "9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
302 | | "vimLevelResourceType": "OS::Nova::Server" |
303 | | }, |
304 | | "vnfcCpInfo": [ |
305 | | { |
306 | | "id": "VDU2_CP1-9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
307 | | "cpdId": "VDU2_CP1", |
308 | | "vnfLinkPortId": "b0e4a59e-5831-4deb-aaba-fd4d0d02248b" |
309 | | } |
310 | | ], |
311 | | "metadata": { |
312 | | "creation_time": "2023-04-07T09:49:14Z", |
313 | | "stack_id": "vnf-ae844932-730a-4063-ad1d-7e3f7f9d82d1/87e00a91-17d7-496e-b30e-a99af1a6726e", |
314 | | "flavor": "m1.tiny", |
315 | | "image-VDU2": "cirros-0.5.2-x86_64-disk" |
316 | | } |
317 | | } |
318 | | ], |
319 | | "vnfVirtualLinkResourceInfo": [ |
320 | | { |
321 | | "id": "c2688b4d-f444-4a9c-b5d1-e25766082a14", |
322 | | "vnfVirtualLinkDescId": "internalVL3", |
323 | | "networkResource": { |
324 | | "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
325 | | "resourceId": "c2688b4d-f444-4a9c-b5d1-e25766082a14", |
326 | | "vimLevelResourceType": "OS::Neutron::Net" |
327 | | }, |
328 | | "vnfLinkPorts": [ |
329 | | { |
330 | | "id": "b0e4a59e-5831-4deb-aaba-fd4d0d02248b", |
331 | | "resourceHandle": { |
332 | | "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
333 | | "resourceId": "b0e4a59e-5831-4deb-aaba-fd4d0d02248b", |
334 | | "vimLevelResourceType": "OS::Neutron::Port" |
335 | | }, |
336 | | "cpInstanceId": "VDU2_CP1-9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
337 | | "cpInstanceType": "VNFC_CP" |
338 | | }, |
339 | | { |
340 | | "id": "09a8a6ab-9a43-4d3a-9cf8-92b18dd74d17", |
341 | | "resourceHandle": { |
342 | | "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
343 | | "resourceId": "09a8a6ab-9a43-4d3a-9cf8-92b18dd74d17", |
344 | | "vimLevelResourceType": "OS::Neutron::Port" |
345 | | }, |
346 | | "cpInstanceId": "VDU1_CP1-5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
347 | | "cpInstanceType": "VNFC_CP" |
348 | | } |
349 | | ] |
350 | | } |
351 | | ], |
352 | | "vnfcInfo": [ |
353 | | { |
354 | | "id": "VDU1-5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
355 | | "vduId": "VDU1", |
356 | | "vnfcResourceInfoId": "5f201bdf-671b-4ba8-9c19-35eb9717ea9d", |
357 | | "vnfcState": "STARTED" |
358 | | }, |
359 | | { |
360 | | "id": "VDU2-9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
361 | | "vduId": "VDU2", |
362 | | "vnfcResourceInfoId": "9fcd21b5-301b-44e2-bb25-6bbffee99c26", |
363 | | "vnfcState": "STARTED" |
364 | | } |
365 | | ], |
366 | | "metadata": { |
367 | | "stack_id": "87e00a91-17d7-496e-b30e-a99af1a6726e" |
368 | | } |
369 | | } |
370 | Instantiation State | INSTANTIATED |
371 | Links | { |
372 | | "self": { |
373 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1" |
374 | | }, |
375 | | "terminate": { |
376 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1/terminate" |
377 | | }, |
378 | | "scale": { |
379 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1/scale" |
380 | | }, |
381 | | "heal": { |
382 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1/heal" |
383 | | }, |
384 | | "changeExtConn": { |
385 | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/ae844932-730a-4063-ad1d-7e3f7f9d82d1/change_ext_conn" |
386 | | } |
387 | | } |
388 | VIM Connection Info | { |
389 | | "vim1": { |
390 | | "vimId": "defb2f96-5670-4bef-8036-27bf61267fc1", |
391 | | "vimType": "ETSINFV.OPENSTACK_KEYSTONE.V_3", |
392 | | "interfaceInfo": { |
393 | | "endpoint": "http://192.168.121.170/identity" |
394 | | }, |
395 | | "accessInfo": { |
396 | | "region": "RegionOne", |
397 | | "project": "admin", |
398 | | "username": "admin", |
399 | | "userDomain": "Default", |
400 | | "projectDomain": "Default" |
401 | | } |
402 | | } |
403 | | } |
404 | VNF Configurable Properties | |
405 | VNF Instance Description | |
406 | VNF Instance Name | |
407 | VNF Product Name | Sample VNF |
408 | VNF Provider | Company |
409 | VNF Software Version | 1.0 |
410 | VNFD ID | e9214953-47d5-45bd-91d1-502accfbe967 |
411 | VNFD Version | 1.0 |
412 +-----------------------------+----------------------------------------------------------------------------------------------------------------------+
413
414 * via API:
415
416 .. code:: bash
417
418 $ curl -X GET ${TACKER_ENDPOINT}/vnflcm/v2/vnf_instances/$VNF_INST_ID \
419 -H "Content-type: application/json" -H "X-Auth-Token:$TOKEN" -H "Version: 2.0.0" \
420 | jq -r '{ instantiationState: .instantiationState,
421 vnfcResourceInfo: .instantiatedVnfInfo.vnfcResourceInfo }'
422 {
423 "instantiationState": "INSTANTIATED",
424 "vnfcResourceInfo": [
425 {
426 "id": "5f201bdf-671b-4ba8-9c19-35eb9717ea9d",
427 "vduId": "VDU1",
428 "computeResource": {
429 "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1",
430 "resourceId": "5f201bdf-671b-4ba8-9c19-35eb9717ea9d",
431 "vimLevelResourceType": "OS::Nova::Server"
432 },
433 "vnfcCpInfo": [
434 {
435 "id": "VDU1_CP1-5f201bdf-671b-4ba8-9c19-35eb9717ea9d",
436 "cpdId": "VDU1_CP1",
437 "vnfLinkPortId": "09a8a6ab-9a43-4d3a-9cf8-92b18dd74d17"
438 }
439 ],
440 "metadata": {
441 "creation_time": "2023-04-07T09:49:22Z",
442 "stack_id": "vnf-ae844932-730a-4063-ad1d-7e3f7f9d82d1-VDU1_scale_group-4qhp7z3cangj-mc4dbvvk73vc-edjhilnlkdww/de2707cf-f222-4c97-9c29-33404a50df94",
443 "parent_stack_id": "vnf-ae844932-730a-4063-ad1d-7e3f7f9d82d1-VDU1_scale_group-4qhp7z3cangj/3eecd59f-5476-47f5-8135-62debac7499b",
444 "parent_resource_name": "mc4dbvvk73vc",
445 "flavor": "m1.tiny",
446 "image-VDU1": "cirros-0.5.2-x86_64-disk"
447 }
448 },
449 {
450 "id": "9fcd21b5-301b-44e2-bb25-6bbffee99c26",
451 "vduId": "VDU2",
452 "computeResource": {
453 "vimConnectionId": "defb2f96-5670-4bef-8036-27bf61267fc1",
454 "resourceId": "9fcd21b5-301b-44e2-bb25-6bbffee99c26",
455 "vimLevelResourceType": "OS::Nova::Server"
456 },
457 "vnfcCpInfo": [
458 {
459 "id": "VDU2_CP1-9fcd21b5-301b-44e2-bb25-6bbffee99c26",
460 "cpdId": "VDU2_CP1",
461 "vnfLinkPortId": "b0e4a59e-5831-4deb-aaba-fd4d0d02248b"
462 }
463 ],
464 "metadata": {
465 "creation_time": "2023-04-07T09:49:14Z",
466 "stack_id": "vnf-ae844932-730a-4063-ad1d-7e3f7f9d82d1/87e00a91-17d7-496e-b30e-a99af1a6726e",
467 "flavor": "m1.tiny",
468 "image-VDU2": "cirros-0.5.2-x86_64-disk"
469 }
470 }
471 ],
472 }
Ayumu Ueha43821df2023-04-07 13:16:50 +0000473
4742. Verify the VM created successfully by :command:`openstack stack list/show` command or OpenStack Dashboard.
475
476Terminate
477~~~~~~~~~
478Terminate a VNF by specifying the VNF Instance ID.
479
Ayumu Uehac12629c2023-04-14 06:19:14 +0000480* via CLI command:
Ayumu Ueha43821df2023-04-07 13:16:50 +0000481
Ayumu Uehac12629c2023-04-14 06:19:14 +0000482 .. code:: bash
Ayumu Ueha43821df2023-04-07 13:16:50 +0000483
Ayumu Uehac12629c2023-04-14 06:19:14 +0000484 $ openstack vnflcm terminate fba5bda0-0b52-4d80-bffb-709200baf1e3 --os-tacker-api-version 2
485 Terminate request for VNF Instance 'fba5bda0-0b52-4d80-bffb-709200baf1e3' has been accepted.
486
487* via API:
488
489 .. code:: bash
490
491 $ curl -i -X POST ${TACKER_ENDPOINT}/vnflcm/v2/vnf_instances/$VNF_INST_ID/terminate \
492 -H "Content-type: application/json" -H "X-Auth-Token:$TOKEN" -H "Version: 2.0.0" \
493 -d '{"terminationType": "FORCEFUL"}'
Ayumu Ueha43821df2023-04-07 13:16:50 +0000494
495.. _ETSI NFV-SOL VNF Deployment: https://docs.openstack.org/tacker/latest/user/etsi_vnf_deployment_as_vm_with_user_data.html
Ayumu Uehac12629c2023-04-14 06:19:14 +0000496.. _Use Case Guide: https://docs.openstack.org/tacker/latest/user/etsi_use_case_guide.html
497.. _API Reference: https://docs.openstack.org/api-ref/nfv-orchestration
Ayumu Ueha43821df2023-04-07 13:16:50 +0000498.. _Prepare VNF Package: https://docs.openstack.org/tacker/latest/user/vnf-package.html