5a1e4a1ccb
At present the VNF mgmt IP address is assigned to parameter name of "mgmt_url". In this patch it is changed to "mgmt_ip_address" which will be relevant one Co-Authored-By: Dharmendra Kushwaha <dharmendra.kushwaha@india.nec.com> Change-Id: I621b71d4af96a4bfa0f27442efe4d302c5afa96d Partial-Bug: #1648327
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
---
|
|
version: '2.0'
|
|
|
|
std.create_vnf:
|
|
type: direct
|
|
|
|
description: |
|
|
Create a VNF and waits till VNF is active.
|
|
|
|
input:
|
|
- body
|
|
output:
|
|
vnf_id: <% $.vnf_id %>
|
|
vim_id: <% $.vim_id %>
|
|
mgmt_ip_address: <% $.mgmt_ip_address %>
|
|
status: <% $.status %>
|
|
|
|
task-defaults:
|
|
on-error:
|
|
- delete_vnf
|
|
|
|
tasks:
|
|
create_vnf:
|
|
description: Request to create a VNF.
|
|
action: tacker.create_vnf body=<% $.body %>
|
|
input:
|
|
body: <% $.body %>
|
|
publish:
|
|
vnf_id: <% task(create_vnf).result.vnf.id %>
|
|
vim_id: <% task(create_vnf).result.vnf.vim_id %>
|
|
mgmt_ip_address: <% task(create_vnf).result.vnf.mgmt_ip_address %>
|
|
status: <% task(create_vnf).result.vnf.status %>
|
|
on-success:
|
|
- wait_vnf_active
|
|
|
|
wait_vnf_active:
|
|
description: Waits till VNF is ACTIVE.
|
|
action: tacker.show_vnf vnf=<% $.vnf_id %>
|
|
retry:
|
|
count: 10
|
|
delay: 10
|
|
break-on: <% $.status = 'ACTIVE' %>
|
|
break-on: <% $.status = 'ERROR' %>
|
|
continue-on: <% $.status = 'PENDING_CREATE' %>
|
|
publish:
|
|
mgmt_ip_address: <% task(wait_vnf_active).result.vnf.mgmt_ip_address %>
|
|
status: <% task(wait_vnf_active).result.vnf.status %>
|
|
on-success:
|
|
- delete_vnf: <% $.status = 'ERROR' %>
|
|
|
|
delete_vnf:
|
|
description: Request to delete a VNF.
|
|
action: tacker.delete_vnf vnf=<% $.vnf_id %>
|