Refactor tacker vnfd samples for consistency

First, rename the filenames to be consistent. Second, use
descriptive nfv_compute properties to describe the VDU
instead of resorting to use nova flavor name. The power
of TOSCA VNFD template is in describing the properties
of a VNF purely using TOSCA constructs *without* using
openstack specific attributes.

Change-Id: I8584dc083b62d30f1463a4739eb8dd7c98957c26
This commit is contained in:
Sridhar Ramaswamy 2016-07-16 00:04:28 +00:00
parent 218fb2de54
commit 66afcda738
9 changed files with 87 additions and 25 deletions

View File

@ -12,13 +12,16 @@ topology_template:
capabilities: capabilities:
nfv_compute: nfv_compute:
properties: properties:
disk_size: 1 GB num_cpus: 1
mem_size: 512 MB mem_size: 512 MB
num_cpus: 2 disk_size: 1 GB
properties: properties:
image: cirros-0.3.4-x86_64-uec image: cirros-0.3.4-x86_64-uec
mgmt_driver: noop
availability_zone: nova availability_zone: nova
mgmt_driver: noop
config: |
param0: key1
param1: key2
CP1: CP1:
type: tosca.nodes.nfv.CP.Tacker type: tosca.nodes.nfv.CP.Tacker
@ -31,7 +34,39 @@ topology_template:
- virtualBinding: - virtualBinding:
node: VDU1 node: VDU1
CP2:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL2
- virtualBinding:
node: VDU1
CP3:
type: tosca.nodes.nfv.CP.Tacker
properties:
anti_spoofing_protection: false
requirements:
- virtualLink:
node: VL3
- virtualBinding:
node: VDU1
VL1: VL1:
type: tosca.nodes.nfv.VL
properties:
network_name: net_mgmt
vendor: Tacker
VL2:
type: tosca.nodes.nfv.VL
properties:
network_name: net0
vendor: Tacker
VL3:
type: tosca.nodes.nfv.VL type: tosca.nodes.nfv.VL
properties: properties:
network_name: net1 network_name: net1

View File

@ -9,9 +9,14 @@ topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 2 GB
disk_size: 20 GB
properties: properties:
image: ubuntu image: ubuntu
flavor: m1.small
availability_zone: nova availability_zone: nova
mgmt_driver: noop mgmt_driver: noop
config: | config: |

View File

@ -9,8 +9,13 @@ topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
flavor: m1.tiny
availability_zone: nova availability_zone: nova
mgmt_driver: noop mgmt_driver: noop
config: | config: |

View File

@ -9,9 +9,14 @@ topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
image: cirros-0.3.4-x86_64-uec image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
availability_zone: nova availability_zone: nova
mgmt_driver: noop mgmt_driver: noop
key_name: userKey key_name: userKey
@ -34,4 +39,4 @@ topology_template:
type: tosca.nodes.nfv.VL type: tosca.nodes.nfv.VL
properties: properties:
network_name: net1 network_name: net1
vendor: Tacker vendor: Tacker

View File

@ -9,9 +9,14 @@ topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
image: cirros-0.3.4-x86_64-uec image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
availability_zone: nova availability_zone: nova
mgmt_driver: noop mgmt_driver: noop
config: | config: |

View File

@ -9,9 +9,14 @@ topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
image: cirros-0.3.4-x86_64-uec image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
availability_zone: nova availability_zone: nova
mgmt_driver: noop mgmt_driver: noop
config: | config: |

View File

@ -10,9 +10,14 @@ topology_template:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
image: OpenWRT image: OpenWRT
flavor: m1.tiny
config: | config: |
param0: key1 param0: key1
param1: key2 param1: key2
@ -65,12 +70,12 @@ topology_template:
VL2: VL2:
type: tosca.nodes.nfv.VL type: tosca.nodes.nfv.VL
properties: properties:
network_name: pkt_in network_name: net0
vendor: Tacker vendor: Tacker
VL3: VL3:
type: tosca.nodes.nfv.VL type: tosca.nodes.nfv.VL
properties: properties:
network_name: pkt_out network_name: net1
vendor: Tacker vendor: Tacker

View File

@ -1,29 +1,26 @@
tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
description: OpenWRT with services description: Demo with user-data
metadata: metadata:
template_name: OpenWRT template_name: sample-vnfd-userdata
topology_template: topology_template:
node_templates: node_templates:
VDU1: VDU1:
type: tosca.nodes.nfv.VDU.Tacker type: tosca.nodes.nfv.VDU.Tacker
capabilities:
nfv_compute:
properties:
num_cpus: 1
mem_size: 512 MB
disk_size: 1 GB
properties: properties:
image: OpenWRT image: cirros-0.3.4-x86_64-uec
flavor: m1.tiny
config: | config: |
param0: key1 param0: key1
param1: key2 param1: key2
mgmt_driver: openwrt mgmt_driver: noop
monitoring_policy:
name: ping
actions:
failure: respawn
parameters:
count: 3
interval: 10
user_data_format: RAW user_data_format: RAW
user_data: | user_data: |
#!/bin/sh #!/bin/sh