tacker/samples/tosca-templates/vnfd/tosca-vnfd-with-params.yaml
Cong Phuoc Hoang c981d65451 Fix issue in 'post_process_heat_template' function
If users specify parameters in 'flavor' or 'image' properties
of a VDU, HOT template can not be processed properly because
there is a missmatch between TOSCA and HOT template.

This patch will change 'get_input' to 'get_param' to fix that
issue.

Change-Id: I353e9d9d70dc6249a62dcdd1281b7b60d28d7d30
Closes-Bug: #1813135
Depends-On: Ib95ed31c70073cb732d41defe5bdc8027eadfeec
2019-03-26 11:13:43 +00:00

151 lines
3.3 KiB
YAML

tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
description: VNF TOSCA template with input parameters
metadata:
template_name: sample-tosca-vnfd
topology_template:
inputs:
image_name:
type: string
description: Image Name
image_source:
type: string
description: Image source
flavor:
type: string
description: Flavor Information
zone:
type: string
description: Zone Information
network:
type: string
description: management network
management:
type: string
description: management network
pkt_in_network:
type: string
description: In network
pkt_out_network:
type: string
description: Out network
vendor:
type: string
description: Vendor information
node_templates:
VDU1:
type: tosca.nodes.nfv.VDU.Tacker
properties:
image: { get_input: image_name }
flavor: { get_input: flavor }
availability_zone: { get_input: zone }
mgmt_driver: noop
config: |
param0: key1
param1: key2
CP11:
type: tosca.nodes.nfv.CP.Tacker
properties:
management: { get_input: management }
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL1
- virtualBinding:
node: VDU1
CP12:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL2
- virtualBinding:
node: VDU1
CP13:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL3
- virtualBinding:
node: VDU1
VDU2:
type: tosca.nodes.nfv.VDU.Tacker
properties:
flavor: { get_input: flavor }
availability_zone: { get_input: zone }
mgmt_driver: noop
config: |
param0: key1
param1: key2
artifacts:
VNFImage:
type: tosca.artifacts.Deployment.Image.VM
file: { get_input: image_source }
CP21:
type: tosca.nodes.nfv.CP.Tacker
properties:
management: { get_input: management }
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL1
- virtualBinding:
node: VDU2
CP22:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL2
- virtualBinding:
node: VDU2
CP23:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL3
- virtualBinding:
node: VDU2
VL1:
type: tosca.nodes.nfv.VL
properties:
network_name: { get_input: network }
vendor: { get_input: vendor }
VL2:
type: tosca.nodes.nfv.VL
properties:
network_name: { get_input: pkt_in_network }
vendor: { get_input: vendor }
VL3:
type: tosca.nodes.nfv.VL
properties:
network_name: { get_input: pkt_out_network }
vendor: { get_input: vendor }