Add a VNF package sample for practical use cases
Added a sample VNF package for practical use cases. In this sample, the use cases listed below is supported. - using multiple deployment flavours - deploying VNF connected to an external network - deploying VNF as HA cluster - deploying scalable VNF Implements: blueprint add-vnf-package-sample-for-practical-use-cases Spec: https://review.opendev.org/c/openstack/tacker-specs/+/814511 Change-Id: I1c55e028b96ba3c1ad26270d359e0b1165670078changes/26/832226/13
parent
61cb57a8b9
commit
2ee465438c
|
@ -106,3 +106,14 @@ Kubernetes Cluster VNF
|
|||
mgmt_driver_deploy_k8s_cir_usage_guide
|
||||
mgmt_driver_deploy_k8s_pv_usage_guide
|
||||
mgmt_driver_deploy_k8s_kubespary_usage_guide
|
||||
|
||||
Sample Usage
|
||||
^^^^^^^^^^^^
|
||||
|
||||
VM
|
||||
~~
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
practical_sample_package_usage_guide
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,139 @@
|
|||
heat_template_version: newton
|
||||
|
||||
description: "Sample VNF HOT"
|
||||
|
||||
parameters:
|
||||
nfv:
|
||||
type: json
|
||||
security_group:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
|
||||
int_net:
|
||||
type: OS::Neutron::Net
|
||||
properties:
|
||||
name: vdu_int_net
|
||||
admin_state_up: true
|
||||
value_specs:
|
||||
mtu: 1450
|
||||
|
||||
int_subnet:
|
||||
type: OS::Neutron::Subnet
|
||||
depends_on: [ int_net ]
|
||||
properties:
|
||||
name: vdu_int_subnet
|
||||
network: { get_resource: int_net }
|
||||
cidr: 192.168.0.0/24
|
||||
enable_dhcp: true
|
||||
gateway_ip: 192.168.0.254
|
||||
|
||||
router:
|
||||
type: OS::Neutron::Router
|
||||
properties:
|
||||
name: vdu_router
|
||||
admin_state_up: true
|
||||
external_gateway_info:
|
||||
network: { get_param: [ nfv, CP, VDU0_extCP0, network_id ] }
|
||||
external_fixed_ips:
|
||||
- ip_address:
|
||||
get_param:
|
||||
[ nfv, CP, RT_extCP, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
|
||||
router_interface:
|
||||
type: OS::Neutron::RouterInterface
|
||||
depends_on:
|
||||
- router
|
||||
- int_subnet
|
||||
properties:
|
||||
router: { get_resource: router }
|
||||
subnet: { get_resource: int_subnet }
|
||||
|
||||
VDU_vCP:
|
||||
type: OS::Neutron::Port
|
||||
depends_on:
|
||||
- int_subnet
|
||||
properties:
|
||||
network: { get_resource: int_net }
|
||||
fixed_ips:
|
||||
- ip_address: 192.168.0.10
|
||||
security_groups: [ { get_param: security_group } ]
|
||||
|
||||
VDU_extvCP:
|
||||
type: OS::Neutron::FloatingIP
|
||||
depends_on:
|
||||
- VDU_vCP
|
||||
- router_interface
|
||||
properties:
|
||||
fixed_ip_address: 192.168.0.10
|
||||
floating_ip_address:
|
||||
get_param: [ nfv, CP, VDU_extvCP, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
floating_network:
|
||||
get_param: [ nfv, CP, VDU_extvCP, network_id ]
|
||||
port_id: { get_resource: VDU_vCP }
|
||||
|
||||
VDU_0:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [ VDU0_CP0 ]
|
||||
properties:
|
||||
name: VDU_0
|
||||
flavor: { get_param: [ nfv, VDU, VDU_0, flavor ] }
|
||||
image: { get_param: [ nfv, VDU, VDU_0, image ] }
|
||||
networks:
|
||||
- port: { get_resource: VDU0_CP0 }
|
||||
|
||||
VDU0_CP0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on: [ router_interface ]
|
||||
properties:
|
||||
network: { get_resource: int_net }
|
||||
fixed_ips: [ { ip_address: 192.168.0.11 } ]
|
||||
allowed_address_pairs: [ { ip_address: 192.168.0.10 } ]
|
||||
security_groups: [ { get_param: security_group } ]
|
||||
|
||||
VDU0_floating_ip:
|
||||
type: OS::Neutron::FloatingIP
|
||||
depends_on: [ VDU0_CP0 ]
|
||||
properties:
|
||||
fixed_ip_address: 192.168.0.11
|
||||
floating_ip_address:
|
||||
get_param: [ nfv, CP, VDU0_extCP0, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
floating_network: { get_param: [ nfv, CP, VDU0_extCP0, network_id ] }
|
||||
port_id: { get_resource: VDU0_CP0 }
|
||||
|
||||
VDU_1:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [ VDU1_CP0 ]
|
||||
properties:
|
||||
name: VDU_1
|
||||
flavor: { get_param: [ nfv, VDU, VDU_1, flavor ] }
|
||||
image: { get_param: [ nfv, VDU, VDU_1, image ] }
|
||||
networks:
|
||||
- port: { get_resource: VDU1_CP0 }
|
||||
|
||||
VDU1_CP0:
|
||||
type: OS::Neutron::Port
|
||||
depends_on: [ router_interface ]
|
||||
properties:
|
||||
network: { get_resource: int_net }
|
||||
fixed_ips: [ { ip_address: 192.168.0.12 } ]
|
||||
allowed_address_pairs: [ { ip_address: 192.168.0.10 } ]
|
||||
security_groups: [ { get_param: security_group } ]
|
||||
|
||||
VDU1_floating_ip:
|
||||
type: OS::Neutron::FloatingIP
|
||||
depends_on: [ VDU1_CP0 ]
|
||||
properties:
|
||||
fixed_ip_address: 192.168.0.12
|
||||
floating_ip_address:
|
||||
get_param: [nfv, CP, VDU1_extCP0, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
floating_network: { get_param: [ nfv, CP, VDU1_extCP0, network_id ] }
|
||||
port_id: { get_resource: VDU1_CP0 }
|
||||
|
||||
outputs:
|
||||
int_net_id:
|
||||
value: { get_resource: int_net }
|
||||
mgmt_ip-VDU_0:
|
||||
value: { get_attr: [ VDU0_floating_ip, floating_ip_address ] }
|
||||
mgmt_ip-VDU_1:
|
||||
value: { get_attr: [ VDU1_floating_ip, floating_ip_address ] }
|
|
@ -0,0 +1,77 @@
|
|||
heat_template_version: rocky
|
||||
description: 'Sample VDU_0 HOT'
|
||||
|
||||
parameters:
|
||||
|
||||
Image:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'glance.image'
|
||||
|
||||
Flavor:
|
||||
type: string
|
||||
default: "m1.tiny"
|
||||
|
||||
ExtNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
IntNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
ExtFixedIP:
|
||||
type: string
|
||||
|
||||
IntFixedIP:
|
||||
type: string
|
||||
|
||||
AvailabilityZone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
Server_Group:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
|
||||
VDU_0:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [ VDU0_CP0, VDU0_CP1 ]
|
||||
properties:
|
||||
name: VDU_000
|
||||
flavor: { get_param: Flavor }
|
||||
image: { get_param: Image }
|
||||
networks:
|
||||
- port:
|
||||
get_resource: VDU0_CP0
|
||||
- port:
|
||||
get_resource: VDU0_CP1
|
||||
availability_zone: { get_param: AvailabilityZone }
|
||||
scheduler_hints:
|
||||
group:
|
||||
get_param: Server_Group
|
||||
|
||||
VDU0_CP0:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: IntNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: IntFixedIP }
|
||||
|
||||
VDU0_CP1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: ExtNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: ExtFixedIP }
|
||||
|
||||
outputs:
|
||||
|
||||
mgmt_ip-VDU_0:
|
||||
value:
|
||||
get_attr: [ VDU0_CP0, fixed_ips, 0, ip_address ]
|
|
@ -0,0 +1,77 @@
|
|||
heat_template_version: rocky
|
||||
description: 'Sample VDU_1 HOT'
|
||||
|
||||
parameters:
|
||||
|
||||
Image:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'glance.image'
|
||||
|
||||
Flavor:
|
||||
type: string
|
||||
default: "m1.tiny"
|
||||
|
||||
ExtNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
IntNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
ExtFixedIP:
|
||||
type: string
|
||||
|
||||
IntFixedIP:
|
||||
type: string
|
||||
|
||||
AvailabilityZone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
Server_Group:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
|
||||
VDU_1:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [ VDU1_CP0, VDU1_CP1 ]
|
||||
properties:
|
||||
name: VDU_100
|
||||
flavor: { get_param: Flavor }
|
||||
image: { get_param: Image }
|
||||
networks:
|
||||
- port:
|
||||
get_resource: VDU1_CP0
|
||||
- port:
|
||||
get_resource: VDU1_CP1
|
||||
availability_zone: { get_param: AvailabilityZone }
|
||||
scheduler_hints:
|
||||
group:
|
||||
get_param: Server_Group
|
||||
|
||||
VDU1_CP0:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: IntNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: IntFixedIP }
|
||||
|
||||
VDU1_CP1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: ExtNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: ExtFixedIP }
|
||||
|
||||
outputs:
|
||||
|
||||
mgmt_ip-VDU_1:
|
||||
value:
|
||||
get_attr: [ VDU1_CP0, fixed_ips, 0, ip_address ]
|
|
@ -0,0 +1,77 @@
|
|||
heat_template_version: rocky
|
||||
description: 'Sample VDU_2 HOT'
|
||||
|
||||
parameters:
|
||||
|
||||
Image:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'glance.image'
|
||||
|
||||
Flavor:
|
||||
type: string
|
||||
default: "m1.tiny"
|
||||
|
||||
ExtNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
IntNetwork:
|
||||
type: string
|
||||
constraints:
|
||||
- custom_constraint: 'neutron.network'
|
||||
|
||||
ExtFixedIP:
|
||||
type: string
|
||||
|
||||
IntFixedIP:
|
||||
type: string
|
||||
|
||||
AvailabilityZone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
Server_Group:
|
||||
type: string
|
||||
|
||||
resources:
|
||||
|
||||
VDU_2:
|
||||
type: OS::Nova::Server
|
||||
depends_on: [ VDU2_CP0, VDU2_CP1 ]
|
||||
properties:
|
||||
name: VDU_200
|
||||
flavor: { get_param: Flavor }
|
||||
image: { get_param: Image }
|
||||
networks:
|
||||
- port:
|
||||
get_resource: VDU2_CP0
|
||||
- port:
|
||||
get_resource: VDU2_CP1
|
||||
availability_zone: { get_param: AvailabilityZone }
|
||||
scheduler_hints:
|
||||
group:
|
||||
get_param: Server_Group
|
||||
|
||||
VDU2_CP0:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: IntNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: IntFixedIP }
|
||||
|
||||
VDU2_CP1:
|
||||
type: OS::Neutron::Port
|
||||
properties:
|
||||
network:
|
||||
get_param: ExtNetwork
|
||||
fixed_ips:
|
||||
- ip_address: { get_param: ExtFixedIP }
|
||||
|
||||
outputs:
|
||||
|
||||
mgmt_ip-VDU_2:
|
||||
value:
|
||||
get_attr: [ VDU2_CP0, fixed_ips, 0, ip_address ]
|
|
@ -0,0 +1,129 @@
|
|||
heat_template_version: newton
|
||||
|
||||
description: "Sample VNF HOT"
|
||||
|
||||
parameters:
|
||||
nfv:
|
||||
type: json
|
||||
|
||||
security_group:
|
||||
type: string
|
||||
|
||||
vdu0_availabilityzone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
vdu1_availabilityzone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
vdu2_availabilityzone:
|
||||
type: string
|
||||
default: "nova"
|
||||
|
||||
resources:
|
||||
|
||||
int_net:
|
||||
type: OS::Neutron::Net
|
||||
properties:
|
||||
name: int_net
|
||||
admin_state_up: true
|
||||
value_specs:
|
||||
mtu: 1450
|
||||
|
||||
int_subnet:
|
||||
type: OS::Neutron::Subnet
|
||||
depends_on: [ int_net ]
|
||||
properties:
|
||||
name: int_subnet
|
||||
network: { get_resource: int_net }
|
||||
cidr: 192.168.1.0/24
|
||||
enable_dhcp: true
|
||||
gateway_ip: 192.168.1.254
|
||||
|
||||
VDU_0:
|
||||
type: OS::Heat::AutoScalingGroup
|
||||
properties:
|
||||
cooldown: 120
|
||||
desired_capacity: 1
|
||||
max_size: 1
|
||||
min_size: 1
|
||||
resource:
|
||||
type: VDU_0.yaml
|
||||
properties:
|
||||
Image: { get_param: [ nfv, VDU, VDU_0, image ] }
|
||||
Flavor: { get_param: [ nfv, VDU, VDU_0, flavor ] }
|
||||
IntNetwork: { get_resource: int_net }
|
||||
IntFixedIP: 192.168.1.10
|
||||
ExtNetwork: { get_param: [ nfv, CP, VDU0_CP1, network_id ] }
|
||||
ExtFixedIP:
|
||||
get_param: [ nfv, CP, VDU0_CP1, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
AvailabilityZone: { get_param: vdu0_availabilityzone }
|
||||
Server_Group: { get_resource: vdu_placement_policy }
|
||||
|
||||
VDU_1:
|
||||
type: OS::Heat::AutoScalingGroup
|
||||
properties:
|
||||
cooldown: 120
|
||||
desired_capacity: 1
|
||||
max_size: 1
|
||||
min_size: 1
|
||||
resource:
|
||||
type: VDU_1.yaml
|
||||
properties:
|
||||
Image: { get_param: [ nfv, VDU, VDU_1, image ] }
|
||||
Flavor: { get_param: [ nfv, VDU, VDU_1, flavor ] }
|
||||
IntNetwork: { get_resource: int_net }
|
||||
IntFixedIP: 192.168.1.11
|
||||
ExtNetwork: { get_param: [ nfv, CP, VDU1_CP1, network_id ] }
|
||||
ExtFixedIP:
|
||||
get_param: [ nfv, CP, VDU1_CP1, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
AvailabilityZone: { get_param: vdu1_availabilityzone }
|
||||
Server_Group: { get_resource: vdu_placement_policy }
|
||||
|
||||
VDU_2:
|
||||
type: OS::Heat::AutoScalingGroup
|
||||
properties:
|
||||
cooldown: 120
|
||||
desired_capacity: { get_param: [nfv, VDU, VDU_2, number_of_instance ] }
|
||||
max_size: 1
|
||||
min_size: 0
|
||||
resource:
|
||||
type: VDU_2.yaml
|
||||
properties:
|
||||
Image: { get_param: [ nfv, VDU, VDU_2, image ] }
|
||||
Flavor: { get_param: [ nfv, VDU, VDU_2, flavor ] }
|
||||
IntNetwork: { get_resource: int_net }
|
||||
IntFixedIP: 192.168.1.13
|
||||
ExtNetwork: { get_param: [ nfv, CP, VDU2_CP1, network_id ] }
|
||||
ExtFixedIP:
|
||||
get_param: [ nfv, CP, VDU2_CP1, subnets, 0, fixed_ip_addresses, 0 ]
|
||||
AvailabilityZone: { get_param: vdu2_availabilityzone }
|
||||
Server_Group: { get_resource: vdu_placement_policy }
|
||||
|
||||
VDU_2_scale_in:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
adjustment_type: change_in_capacity
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU_2
|
||||
cooldown: 120
|
||||
scaling_adjustment: -1
|
||||
|
||||
VDU_2_scale_out:
|
||||
type: OS::Heat::ScalingPolicy
|
||||
properties:
|
||||
adjustment_type: change_in_capacity
|
||||
auto_scaling_group_id:
|
||||
get_resource: VDU_2
|
||||
cooldown: 120
|
||||
scaling_adjustment: 1
|
||||
|
||||
vdu_placement_policy:
|
||||
type: OS::Nova::ServerGroup
|
||||
properties:
|
||||
name: vdu_placement_policy
|
||||
policies:
|
||||
- soft-anti-affinity
|
||||
|
||||
outputs:
|
|
@ -0,0 +1,72 @@
|
|||
tosca_definitions_version: tosca_simple_yaml_1_2
|
||||
|
||||
description: VNF template definition
|
||||
|
||||
imports:
|
||||
- etsi_nfv_sol001_common_types.yaml
|
||||
- etsi_nfv_sol001_vnfd_types.yaml
|
||||
|
||||
node_types:
|
||||
Sample.VNF.Node:
|
||||
derived_from: tosca.nodes.nfv.VNF
|
||||
properties:
|
||||
descriptor_id:
|
||||
type: string
|
||||
default: '3b3c61e4-26b6-4686-80fc-e9ff83010c08'
|
||||
descriptor_version:
|
||||
type: string
|
||||
constraints: [ valid_values: [ '1.0' ] ]
|
||||
default: '1.0'
|
||||
provider:
|
||||
type: string
|
||||
constraints: [ valid_values: [ Sample ] ]
|
||||
default: Sample
|
||||
product_name:
|
||||
type: string
|
||||
constraints: [ valid_values: [ Node ] ]
|
||||
default: Node
|
||||
software_version:
|
||||
type: string
|
||||
constraints: [ valid_values: [ '10.1' ] ]
|
||||
default: '10.1'
|
||||
vnfm_info:
|
||||
type: list
|
||||
entry_schema:
|
||||
type: string
|
||||
constraints: [ valid_values: [ Tacker ] ]
|
||||
default: [ Tacker ]
|
||||
flavour_id:
|
||||
type: string
|
||||
constraints: [ valid_values: [ ha, scalable ] ]
|
||||
default: ha
|
||||
flavour_description:
|
||||
type: string
|
||||
default: 'vnf'
|
||||
requirements:
|
||||
- VNF0_extnet0:
|
||||
capability: tosca.capabilities.nfv.VirtualLinkable
|
||||
relationship: tosca.relationships.nfv.VirtualLinksTo
|
||||
occurrences: [ 0, 1 ]
|
||||
- VNF1_extnet0:
|
||||
capability: tosca.capabilities.nfv.VirtualLinkable
|
||||
relationship: tosca.relationships.nfv.VirtualLinksTo
|
||||
occurrences: [ 0, 1 ]
|
||||
interfaces:
|
||||
Vnflcm:
|
||||
type: tosca.interfaces.nfv.Vnflcm
|
||||
instantiate: []
|
||||
instantiate_start: []
|
||||
instantiate_end: []
|
||||
scale: []
|
||||
scale_start: []
|
||||
scale_end: []
|
||||
heal: []
|
||||
heal_start: []
|
||||
heal_end: []
|
||||
terminate: []
|
||||
terminate_start: []
|
||||
terminate_end: []
|
||||
modify_information: []
|
||||
modify_information_start: []
|
||||
modify_information_end: []
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
tosca_definitions_version: tosca_simple_yaml_1_2
|
||||
|
||||
description: VNF definitions
|
||||
|
||||
imports:
|
||||
- etsi_nfv_sol001_common_types.yaml
|
||||
- etsi_nfv_sol001_vnfd_types.yaml
|
||||
- Common.yaml
|
||||
- df_ha.yaml
|
||||
- df_scalable.yaml
|
||||
|
||||
topology_template:
|
||||
inputs:
|
||||
selected_flavour:
|
||||
type: string
|
||||
description: VNF deployment flavour selected by the consumer. Itis provided in the API.
|
||||
|
||||
node_templates:
|
||||
VNF:
|
||||
type: Sample.VNF.Node
|
||||
properties:
|
||||
flavour_id: { get_input: selected_flavour }
|
||||
flavour_description: 'vnf'
|
||||
descriptor_id: 75aaa9fa-9c79-dcf5-bda2-5b98a08c9f54
|
||||
provider: Sample
|
||||
product_name: Node
|
||||
software_version: '10.1'
|
||||
descriptor_version: '1.0'
|
||||
vnfm_info:
|
||||
- Tacker
|
||||
requirements:
|
|
@ -0,0 +1,232 @@
|
|||
tosca_definitions_version: tosca_simple_yaml_1_2
|
||||
|
||||
description: Sample VNF ha DF
|
||||
|
||||
imports:
|
||||
- etsi_nfv_sol001_common_types.yaml
|
||||
- etsi_nfv_sol001_vnfd_types.yaml
|
||||
- Common.yaml
|
||||
|
||||
topology_template:
|
||||
inputs:
|
||||
descriptor_id:
|
||||
type: string
|
||||
descriptor_version:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
product_name:
|
||||
type: string
|
||||
software_version:
|
||||
type: string
|
||||
vnfm_info:
|
||||
type: list
|
||||
entry_schema:
|
||||
type: string
|
||||
flavour_id:
|
||||
type: string
|
||||
flavour_description:
|
||||
type: string
|
||||
configurable_properties:
|
||||
type: map
|
||||
|
||||
substitution_mappings:
|
||||
node_type: Sample.VNF.Node
|
||||
properties:
|
||||
flavour_id: ha
|
||||
requirements:
|
||||
VDU0_extnet: [ VDU0_extCP0, external_virtual_link ]
|
||||
VDU1_extnet: [ VDU1_extCP0, external_virtual_link ]
|
||||
VDU_extnet: [ VDU_extvCP, external_virtual_link ]
|
||||
RT_extnet: [ RT_extCP, external_virtual_link ]
|
||||
|
||||
node_templates:
|
||||
VNF:
|
||||
type: Sample.VNF.Node
|
||||
properties:
|
||||
flavour_description: 'ha'
|
||||
configurable_properties:
|
||||
is_autoscale_enabled: false
|
||||
is_autoheal_enabled: false
|
||||
vnfm_info:
|
||||
- Tacker
|
||||
interfaces:
|
||||
Vnflcm:
|
||||
instantiate: []
|
||||
instantiate_start: []
|
||||
instantiate_end: []
|
||||
scale: []
|
||||
scale_start: []
|
||||
scale_end: []
|
||||
heal: []
|
||||
heal_start: []
|
||||
heal_end: []
|
||||
terminate: []
|
||||
terminate_start: []
|
||||
terminate_end: []
|
||||
modify_information: []
|
||||
modify_information_start: []
|
||||
modify_information_end: []
|
||||
|
||||
VDU_0:
|
||||
type: tosca.nodes.nfv.Vdu.Compute
|
||||
properties:
|
||||
name: VDU_0
|
||||
description: VDU_0
|
||||
vdu_profile:
|
||||
min_number_of_instances: 1
|
||||
max_number_of_instances: 1
|
||||
sw_image_data:
|
||||
name: sample_image
|
||||
version: '1.0'
|
||||
checksum:
|
||||
algorithm: sha-512
|
||||
hash: 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e2161b5b5186106570c17a9e58b64dd39390617cd5a350f78
|
||||
container_format: bare
|
||||
disk_format: qcow2
|
||||
min_disk: 0 GB
|
||||
size: 1869 MB
|
||||
capabilities:
|
||||
virtual_compute:
|
||||
properties:
|
||||
requested_additional_capabilities:
|
||||
properties:
|
||||
requested_additional_capability_name: sample_flavor
|
||||
support_mandatory: true
|
||||
target_performance_parameters:
|
||||
entry_schema: test
|
||||
virtual_memory:
|
||||
virtual_mem_size: 512 MB
|
||||
virtual_cpu:
|
||||
num_virtual_cpu: 1
|
||||
virtual_local_storage:
|
||||
- size_of_storage: 1 GB
|
||||
|
||||
VDU_1:
|
||||
type: tosca.nodes.nfv.Vdu.Compute
|
||||
properties:
|
||||
name: VDU_1
|
||||
description: VDU_1
|
||||
vdu_profile:
|
||||
min_number_of_instances: 1
|
||||
max_number_of_instances: 1
|
||||
sw_image_data:
|
||||
name: sample_image
|
||||
version: '1.0'
|
||||
checksum:
|
||||
algorithm: sha-512
|
||||
hash: 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e2161b5b5186106570c17a9e58b64dd39390617cd5a350f78
|
||||
container_format: bare
|
||||
disk_format: qcow2
|
||||
min_disk: 0 GB
|
||||
size: 1869 MB
|
||||
capabilities:
|
||||
virtual_compute:
|
||||
properties:
|
||||
requested_additional_capabilities:
|
||||
properties:
|
||||
requested_additional_capability_name: sample_flavor
|
||||
support_mandatory: true
|
||||
target_performance_parameters:
|
||||
entry_schema: test
|
||||
virtual_memory:
|
||||
virtual_mem_size: 512 MB
|
||||
virtual_cpu:
|
||||
num_virtual_cpu: 1
|
||||
virtual_local_storage:
|
||||
- size_of_storage: 1 GB
|
||||
|
||||
VDU0_CP0:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_0
|
||||
- virtual_link: VDU_intnet0
|
||||
|
||||
VDU1_CP0:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_1
|
||||
- virtual_link: VDU_intnet0
|
||||
|
||||
VDU0_extCP0:
|
||||
type: tosca.nodes.nfv.VnfExtCp
|
||||
properties:
|
||||
layer_protocols: [ ipv4 ]
|
||||
requirements:
|
||||
- internal_virtual_link: VDU_intnet0
|
||||
|
||||
VDU1_extCP0:
|
||||
type: tosca.nodes.nfv.VnfExtCp
|
||||
properties:
|
||||
layer_protocols: [ ipv4 ]
|
||||
requirements:
|
||||
- internal_virtual_link: VDU_intnet0
|
||||
|
||||
VDU_intnet0:
|
||||
type: tosca.nodes.nfv.VnfVirtualLink
|
||||
properties:
|
||||
connectivity_type:
|
||||
layer_protocols: [ ipv4 ]
|
||||
vl_profile:
|
||||
max_bitrate_requirements:
|
||||
root: 1000000
|
||||
min_bitrate_requirements:
|
||||
root: 100000
|
||||
virtual_link_protocol_data:
|
||||
- associated_layer_protocol: ipv4
|
||||
l2_protocol_data:
|
||||
network_type: vxlan
|
||||
l3_protocol_data:
|
||||
ip_version: ipv4
|
||||
cidr: '192.168.0.0/24'
|
||||
dhcp_enabled: true
|
||||
|
||||
RT_extCP:
|
||||
type: tosca.nodes.nfv.VnfExtCp
|
||||
properties:
|
||||
layer_protocols: [ ipv4 ]
|
||||
requirements:
|
||||
- internal_virtual_link: VDU_intnet0
|
||||
|
||||
VDU_extvCP:
|
||||
type: tosca.nodes.nfv.VnfExtCp
|
||||
properties:
|
||||
layer_protocols: [ ipv4 ]
|
||||
requirements:
|
||||
- internal_virtual_link: VDU_intnet0
|
||||
|
||||
groups:
|
||||
VDU_AntiAffinityGroup:
|
||||
type: tosca.groups.nfv.PlacementGroup
|
||||
members: [ VDU_0, VDU_1 ]
|
||||
|
||||
policies:
|
||||
- VDU_placement_policy:
|
||||
type: tosca.policies.nfv.AntiAffinityRule
|
||||
targets: [ VDU_AntiAffinityGroup ]
|
||||
properties:
|
||||
scope: nfvi_node
|
|
@ -0,0 +1,391 @@
|
|||
tosca_definitions_version: tosca_simple_yaml_1_2
|
||||
|
||||
description: Sample VNF default DF
|
||||
|
||||
imports:
|
||||
- etsi_nfv_sol001_common_types.yaml
|
||||
- etsi_nfv_sol001_vnfd_types.yaml
|
||||
- Common.yaml
|
||||
|
||||
topology_template:
|
||||
inputs:
|
||||
descriptor_id:
|
||||
type: string
|
||||
descriptor_version:
|
||||
type: string
|
||||
provider:
|
||||
type: string
|
||||
product_name:
|
||||
type: string
|
||||
software_version:
|
||||
type: string
|
||||
vnfm_info:
|
||||
type: list
|
||||
entry_schema:
|
||||
type: string
|
||||
flavour_id:
|
||||
type: string
|
||||
flavour_description:
|
||||
type: string
|
||||
configurable_properties:
|
||||
type: map
|
||||
|
||||
substitution_mappings:
|
||||
node_type: Sample.VNF.Node
|
||||
properties:
|
||||
flavour_id: scalable
|
||||
requirements:
|
||||
VDU0_extnet: [ VDU0_CP1, external_virtual_link ]
|
||||
VDU1_extnet: [ VDU1_CP1, external_virtual_link ]
|
||||
VDU2_extnet: [ VDU2_CP1, external_virtual_link ]
|
||||
|
||||
node_templates:
|
||||
VNF:
|
||||
type: Sample.VNF.Node
|
||||
properties:
|
||||
flavour_description: 'scalable'
|
||||
configurable_properties:
|
||||
is_autoscale_enabled: false
|
||||
is_autoheal_enabled: false
|
||||
vnfm_info:
|
||||
- Tacker
|
||||
interfaces:
|
||||
Vnflcm:
|
||||
instantiate: []
|
||||
instantiate_start: []
|
||||
instantiate_end: []
|
||||
scale: []
|
||||
scale_start: []
|
||||
scale_end: []
|
||||
heal: []
|
||||
heal_start: []
|
||||
heal_end: []
|
||||
terminate: []
|
||||
terminate_start: []
|
||||
terminate_end: []
|
||||
modify_information: []
|
||||
modify_information_start: []
|
||||
modify_information_end: []
|
||||
|
||||
VDU_0:
|
||||
type: tosca.nodes.nfv.Vdu.Compute
|
||||
properties:
|
||||
name: VDU_0
|
||||
description: VDU_0
|
||||
vdu_profile:
|
||||
min_number_of_instances: 1
|
||||
max_number_of_instances: 1
|
||||
sw_image_data:
|
||||
name: sample_image
|
||||
version: '1.0'
|
||||
checksum:
|
||||
algorithm: sha-512
|
||||
hash: 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e2161b5b5186106570c17a9e58b64dd39390617cd5a350f78
|
||||
container_format: bare
|
||||
disk_format: qcow2
|
||||
min_disk: 0 GB
|
||||
size: 1869 MB
|
||||
capabilities:
|
||||
virtual_compute:
|
||||
properties:
|
||||
requested_additional_capabilities:
|
||||
properties:
|
||||
requested_additional_capability_name: sample_flavor
|
||||
support_mandatory: true
|
||||
target_performance_parameters:
|
||||
entry_schema: test
|
||||
virtual_memory:
|
||||
virtual_mem_size: 512 MB
|
||||
virtual_cpu:
|
||||
num_virtual_cpu: 1
|
||||
virtual_local_storage:
|
||||
- size_of_storage: 1 GB
|
||||
|
||||
VDU_1:
|
||||
type: tosca.nodes.nfv.Vdu.Compute
|
||||
properties:
|
||||
name: VDU_1
|
||||
description: VDU_1
|
||||
vdu_profile:
|
||||
min_number_of_instances: 1
|
||||
max_number_of_instances: 1
|
||||
sw_image_data:
|
||||
name: sample_image
|
||||
version: '1.0'
|
||||
checksum:
|
||||
algorithm: sha-512
|
||||
hash: 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e2161b5b5186106570c17a9e58b64dd39390617cd5a350f78
|
||||
container_format: bare
|
||||
disk_format: qcow2
|
||||
min_disk: 0 GB
|
||||
size: 1869 MB
|
||||
capabilities:
|
||||
virtual_compute:
|
||||
properties:
|
||||
requested_additional_capabilities:
|
||||
properties:
|
||||
requested_additional_capability_name: sample_flavor
|
||||
support_mandatory: true
|
||||
target_performance_parameters:
|
||||
entry_schema: test
|
||||
virtual_memory:
|
||||
virtual_mem_size: 512 MB
|
||||
virtual_cpu:
|
||||
num_virtual_cpu: 1
|
||||
virtual_local_storage:
|
||||
- size_of_storage: 1 GB
|
||||
|
||||
VDU_2:
|
||||
type: tosca.nodes.nfv.Vdu.Compute
|
||||
properties:
|
||||
name: VDU_2
|
||||
description: VDU_2
|
||||
vdu_profile:
|
||||
min_number_of_instances: 0
|
||||
max_number_of_instances: 1
|
||||
sw_image_data:
|
||||
name: sample_image
|
||||
version: '1.0'
|
||||
checksum:
|
||||
algorithm: sha-512
|
||||
hash: 6513f21e44aa3da349f248188a44bc304a3653a04122d8fb4535423c8e1d14cd6a153f735bb0982e2161b5b5186106570c17a9e58b64dd39390617cd5a350f78
|
||||
container_format: bare
|
||||
disk_format: qcow2
|
||||
min_disk: 0 GB
|
||||
size: 1869 MB
|
||||
capabilities:
|
||||
virtual_compute:
|
||||
properties:
|
||||
requested_additional_capabilities:
|
||||
properties:
|
||||
requested_additional_capability_name: sample_flavor
|
||||
support_mandatory: true
|
||||
target_performance_parameters:
|
||||
entry_schema: test
|
||||
virtual_memory:
|
||||
virtual_mem_size: 512 MB
|
||||
virtual_cpu:
|
||||
num_virtual_cpu: 1
|
||||
virtual_local_storage:
|
||||
- size_of_storage: 1 GB
|
||||
|
||||
VDU0_CP0:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_0
|
||||
- virtual_link: int_net
|
||||
|
||||
VDU0_CP1:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_0
|
||||
|
||||
VDU1_CP0:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_1
|
||||
- virtual_link: int_net
|
||||
|
||||
VDU1_CP1:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_1
|
||||
|
||||
VDU2_CP0:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_2
|
||||
- virtual_link: int_net
|
||||
|
||||
VDU2_CP1:
|
||||
type: tosca.nodes.nfv.VduCp
|
||||
properties:
|
||||
order: 0
|
||||
bitrate_requirement: 1
|
||||
vnic_type: normal
|
||||
layer_protocols: [ ipv4 ]
|
||||
protocol:
|
||||
- associated_layer_protocol: ipv4
|
||||
address_data:
|
||||
- address_type: ip_address
|
||||
l3_address_data:
|
||||
ip_address_assignment: true
|
||||
floating_ip_activated: false
|
||||
requirements:
|
||||
- virtual_binding: VDU_2
|
||||
|
||||
int_net:
|
||||
type: tosca.nodes.nfv.VnfVirtualLink
|
||||
properties:
|
||||
connectivity_type:
|
||||
layer_protocols: [ ipv4 ]
|
||||
vl_profile:
|
||||
max_bitrate_requirements:
|
||||
root: 1000000
|
||||
min_bitrate_requirements:
|
||||
root: 100000
|
||||
virtual_link_protocol_data:
|
||||
- associated_layer_protocol: ipv4
|
||||
l2_protocol_data:
|
||||
network_type: vxlan
|
||||
l3_protocol_data:
|
||||
ip_version: ipv4
|
||||
cidr: '192.168.1.0/24'
|
||||
|
||||
groups:
|
||||
VDU_AntiAffinityGroup:
|
||||
type: tosca.groups.nfv.PlacementGroup
|
||||
members: [ VDU_0, VDU_1, VDU_2 ]
|
||||
|
||||
policies:
|
||||
- VDU_placement_policy:
|
||||
type: tosca.policies.nfv.AntiAffinityRule
|
||||
targets: [ VDU_AntiAffinityGroup ]
|
||||
properties:
|
||||
scope: nfvi_node
|
||||
|
||||
- vdu_scale:
|
||||
type: tosca.policies.nfv.ScalingAspects
|
||||
properties:
|
||||
aspects:
|
||||
VDU_2:
|
||||
name: VDU_2
|
||||
description: VDU_2
|
||||
max_scale_level: 1
|
||||
step_deltas:
|
||||
- delta_1
|
||||
|
||||
- vdu_0_initial_delta:
|
||||
type: tosca.policies.nfv.VduInitialDelta
|
||||
properties:
|
||||
initial_delta:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_0 ]
|
||||
|
||||
- vdu_1_initial_delta:
|
||||
type: tosca.policies.nfv.VduInitialDelta
|
||||
properties:
|
||||
initial_delta:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_1 ]
|
||||
|
||||
- vdu_2_initial_delta:
|
||||
type: tosca.policies.nfv.VduInitialDelta
|
||||
properties:
|
||||
initial_delta:
|
||||
number_of_instances: 0
|
||||
targets: [ VDU_2 ]
|
||||
|
||||
- vdu_2_scaling_aspect_deltas:
|
||||
type: tosca.policies.nfv.VduScalingAspectDeltas
|
||||
properties:
|
||||
aspect: VDU_2
|
||||
deltas:
|
||||
delta_1:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_2 ]
|
||||
|
||||
- instantiation_levels:
|
||||
type: tosca.policies.nfv.InstantiationLevels
|
||||
properties:
|
||||
levels:
|
||||
r-node-min:
|
||||
description: vdu-min structure
|
||||
scale_info:
|
||||
VDU_2:
|
||||
scale_level: 0
|
||||
r-node-max:
|
||||
description: vdu-max structure
|
||||
scale_info:
|
||||
VDU_2:
|
||||
scale_level: 1
|
||||
|
||||
- vdu_0_instantiation_levels:
|
||||
type: tosca.policies.nfv.VduInstantiationLevels
|
||||
properties:
|
||||
levels:
|
||||
r-node-min:
|
||||
number_of_instances: 1
|
||||
r-node-max:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_0 ]
|
||||
|
||||
- vdu_1_instantiation_levels:
|
||||
type: tosca.policies.nfv.VduInstantiationLevels
|
||||
properties:
|
||||
levels:
|
||||
r-node-min:
|
||||
number_of_instances: 1
|
||||
r-node-max:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_1 ]
|
||||
|
||||
- vdu_2_instantiation_levels:
|
||||
type: tosca.policies.nfv.VduInstantiationLevels
|
||||
properties:
|
||||
levels:
|
||||
r-node-min:
|
||||
number_of_instances: 0
|
||||
r-node-max:
|
||||
number_of_instances: 1
|
||||
targets: [ VDU_2 ]
|
|
@ -0,0 +1,203 @@
|
|||
tosca_definitions_version: tosca_simple_yaml_1_2
|
||||
description: ETSI NFV SOL 001 common types definitions version 2.6.1
|
||||
metadata:
|
||||
template_name: etsi_nfv_sol001_common_types
|
||||
template_author: ETSI_NFV
|
||||
template_version: 2.6.1
|
||||
|
||||
data_types:
|
||||
tosca.datatypes.nfv.L2AddressData:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: Describes the information on the MAC addresses to be assigned to a connection point.
|
||||
properties:
|
||||
mac_address_assignment:
|
||||
type: boolean
|
||||
description: Specifies if the address assignment is the responsibility of management and orchestration function or not. If it is set to True, it is the management and orchestration function responsibility
|
||||
required: true
|
||||
|
||||
tosca.datatypes.nfv.L3AddressData:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: Provides information about Layer 3 level addressing scheme and parameters applicable to a CP
|
||||
properties:
|
||||
ip_address_assignment:
|
||||
type: boolean
|
||||
description: Specifies if the address assignment is the responsibility of management and orchestration function or not. If it is set to True, it is the management and orchestration function responsibility
|
||||
required: true
|
||||
floating_ip_activated:
|
||||
type: boolean
|
||||
description: Specifies if the floating IP scheme is activated on the Connection Point or not
|
||||
required: true
|
||||
ip_address_type:
|
||||
type: string
|
||||
description: Defines address type. The address type should be aligned with the address type supported by the layer_protocols properties of the parent VnfExtCp
|
||||
required: false
|
||||
constraints:
|
||||
- valid_values: [ ipv4, ipv6 ]
|
||||
number_of_ip_address:
|
||||
type: integer
|
||||
description: Minimum number of IP addresses to be assigned
|
||||
required: false
|
||||
constraints:
|
||||
- greater_than: 0
|
||||
|
||||
tosca.datatypes.nfv.AddressData:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: Describes information about the addressing scheme and parameters applicable to a CP
|
||||
properties:
|
||||
address_type:
|
||||
type: string
|
||||
description: Describes the type of the address to be assigned to a connection point. The content type shall be aligned with the address type supported by the layerProtocol property of the connection point
|
||||
required: true
|
||||
constraints:
|
||||
- valid_values: [ mac_address, ip_address ]
|
||||
l2_address_data:
|
||||
type: tosca.datatypes.nfv.L2AddressData
|
||||
description: Provides the information on the MAC addresses to be assigned to a connection point.
|
||||
required: false
|
||||
l3_address_data:
|
||||
type: tosca.datatypes.nfv.L3AddressData
|
||||
description: Provides the information on the IP addresses to be assigned to a connection point
|
||||
required: false
|
||||
|
||||
tosca.datatypes.nfv.ConnectivityType:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: describes additional connectivity information of a virtualLink
|
||||
properties:
|
||||
layer_protocols:
|
||||
type: list
|
||||
description: Identifies the protocol a virtualLink gives access to (ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire).The top layer protocol of the virtualLink protocol stack shall always be provided. The lower layer protocols may be included when there are specific requirements on these layers.
|
||||
required: true
|
||||
entry_schema:
|
||||
type: string
|
||||
constraints:
|
||||
- valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
|
||||
flow_pattern:
|
||||
type: string
|
||||
description: Identifies the flow pattern of the connectivity
|
||||
required: false
|
||||
constraints:
|
||||
- valid_values: [ line, tree, mesh ]
|
||||
|
||||
tosca.datatypes.nfv.LinkBitrateRequirements:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: describes the requirements in terms of bitrate for a virtual link
|
||||
properties:
|
||||
root:
|
||||
type: integer # in bits per second
|
||||
description: Specifies the throughput requirement in bits per second of the link (e.g. bitrate of E-Line, root bitrate of E-Tree, aggregate capacity of E-LAN).
|
||||
required: true
|
||||
constraints:
|
||||
- greater_or_equal: 0
|
||||
leaf:
|
||||
type: integer # in bits per second
|
||||
description: Specifies the throughput requirement in bits per second of leaf connections to the link when applicable to the connectivity type (e.g. for E-Tree and E LAN branches).
|
||||
required: false
|
||||
constraints:
|
||||
- greater_or_equal: 0
|
||||
|
||||
tosca.datatypes.nfv.CpProtocolData:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: Describes and associates the protocol layer that a CP uses together with other protocol and connection point information
|
||||
properties:
|
||||
associated_layer_protocol:
|
||||
type: string
|
||||
required: true
|
||||
description: One of the values of the property layer_protocols of the CP
|
||||
constraints:
|
||||
- valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
|
||||
address_data:
|
||||
type: list
|
||||
description: Provides information on the addresses to be assigned to the CP
|
||||
entry_schema:
|
||||
type: tosca.datatypes.nfv.AddressData
|
||||
required: false
|
||||
|
||||
tosca.datatypes.nfv.VnfProfile:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: describes a profile for instantiating VNFs of a particular NS DF according to a specific VNFD and VNF DF.
|
||||
properties:
|
||||
instantiation_level:
|
||||
type: string
|
||||
description: Identifier of the instantiation level of the VNF DF to be used for instantiation. If not present, the default instantiation level as declared in the VNFD shall be used.
|
||||
required: false
|
||||
min_number_of_instances:
|
||||
type: integer
|
||||
description: Minimum number of instances of the VNF based on this VNFD that is permitted to exist for this VnfProfile.
|
||||
required: true
|
||||
constraints:
|
||||
- greater_or_equal: 0
|
||||
max_number_of_instances:
|
||||
type: integer
|
||||
description: Maximum number of instances of the VNF based on this VNFD that is permitted to exist for this VnfProfile.
|
||||
required: true
|
||||
constraints:
|
||||
- greater_or_equal: 0
|
||||
|
||||
tosca.datatypes.nfv.Qos:
|
||||
derived_from: tosca.datatypes.Root
|
||||
description: describes QoS data for a given VL used in a VNF deployment flavour
|
||||
properties:
|
||||
latency:
|
||||
type: scalar-unit.time #Number
|
||||
description: Specifies the maximum latency
|
||||
required: true
|
||||
constraints:
|
||||
- greater_than: 0 s
|
||||
packet_delay_variation:
|
||||
type: scalar-unit.time #Number
|
||||
description: Specifies the maximum jitter
|
||||
required: true
|
||||
constraints:
|
||||
- greater_or_equal: 0 s
|
||||
packet_loss_ratio:
|
||||
type: float
|
||||
description: Specifies the maximum packet loss ratio
|
||||
required: false
|
||||
constraints:
|
||||
- in_range: [ 0.0, 1.0 ]
|
||||
|
||||
capability_types:
|
||||
tosca.capabilities.nfv.VirtualLinkable:
|
||||
derived_from: tosca.capabilities.Node
|
||||
description: A node type that includes the VirtualLinkable capability indicates that it can be pointed by tosca.relationships.nfv.VirtualLinksTo relationship type
|
||||
|
||||
relationship_types:
|
||||
tosca.relationships.nfv.VirtualLinksTo:
|
||||
derived_from: tosca.relationships.DependsOn
|
||||
description: Represents an association relationship between the VduCp and VnfVirtualLink node types
|
||||
valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ]
|
||||
|
||||
node_types:
|
||||
tosca.nodes.nfv.Cp:
|
||||
derived_from: tosca.nodes.Root
|
||||
description: Provides information regarding the purpose of the connection point
|
||||
properties:
|
||||
layer_protocols:
|
||||
type: list
|
||||
description: Identifies which protocol the connection point uses for connectivity purposes
|
||||
required: true
|
||||
entry_schema:
|
||||
type: string
|
||||
constraints:
|
||||
- valid_values: [ ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire ]
|
||||
role: #Name in ETSI NFV IFA011 v0.7.3: cpRole
|
||||
type: string
|
||||
description: Identifies the role of the port in the context of the traffic flow patterns in the VNF or parent NS
|
||||
required: false
|
||||
constraints:
|
||||
- valid_values: [ root, leaf ]
|
||||
description:
|
||||
type: string
|
||||
description: Provides human-readable information on the purpose of the connection point
|
||||
required: false
|
||||
protocol:
|
||||
type: list
|
||||
description: Provides information on the addresses to be assigned to the connection point(s) instantiated from this Connection Point Descriptor
|
||||
required: false
|
||||
entry_schema:
|
||||
type: tosca.datatypes.nfv.CpProtocolData
|
||||
trunk_mode:
|
||||
type: boolean
|
||||
description: Provides information about whether the CP instantiated from this Cp is in Trunk mode (802.1Q or other), When operating in "trunk mode", the Cp is capable of carrying traffic for several VLANs. Absence of this property implies that trunkMode is not configured for the Cp i.e. It is equivalent to boolean value "false".
|
||||
required: false
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,4 @@
|
|||
TOSCA-Meta-File-Version: 1.0
|
||||
CSAR-Version: 1.1
|
||||
Created-by: Onboarding portal
|
||||
Entry-Definitions: Definitions/Node.yaml
|
|
@ -0,0 +1,409 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
|
||||
from tacker.vnfm.lcm_user_data.abstract_user_data import AbstractUserData
|
||||
import tacker.vnfm.lcm_user_data.utils as UserDataUtil
|
||||
|
||||
t_vdu = ('tosca.nodes.nfv.Vdu.Compute', )
|
||||
t_blk = ('tosca.nodes.nfv.Vdu.VirtualBlockStorage', )
|
||||
t_cpd = ('tosca.nodes.nfv.VduCp', 'tosca.nodes.nfv.VnfExtCp', )
|
||||
|
||||
t_anti_affinity = 'tosca.policies.nfv.AntiAffinityRule'
|
||||
t_affinity = 'tosca.policies.nfv.AffinityRule'
|
||||
t_grprule = (t_anti_affinity, t_affinity)
|
||||
t_sc_aspect = ('tosca.policies.nfv.ScalingAspects')
|
||||
t_vdu_sc_asp_delta = ('tosca.policies.nfv.VduScalingAspectDeltas')
|
||||
t_vdu_init_delta = ('tosca.policies.nfv.VduInitialDelta')
|
||||
t_inst_lv = ('tosca.policies.nfv.InstantiationLevels')
|
||||
t_vdu_inst_lv = ('tosca.policies.nfv.VduInstantiationLevels')
|
||||
|
||||
|
||||
def from_key_arrangement(value, key_arrangement):
|
||||
for key in key_arrangement:
|
||||
if isinstance(value, list) and key >= len(value):
|
||||
return None
|
||||
if isinstance(value, dict) and key not in value:
|
||||
return None
|
||||
value = value[key]
|
||||
return value
|
||||
|
||||
|
||||
def get_volumes(value):
|
||||
bind_blk_names = dict()
|
||||
for idx, el in enumerate(value.get('requirements', [])):
|
||||
key = 'virtual_storage'
|
||||
if key not in el:
|
||||
continue
|
||||
vol_name = el[key]
|
||||
bind_blk_names[vol_name] = {'order': idx}
|
||||
return bind_blk_names
|
||||
|
||||
|
||||
def generate_vdu_compute_dict(val):
|
||||
ret = dict()
|
||||
|
||||
key_arrangement = [
|
||||
'capabilities',
|
||||
'virtual_compute',
|
||||
'properties',
|
||||
'requested_additional_capabilities',
|
||||
'properties',
|
||||
'requested_additional_capability_name'
|
||||
]
|
||||
flavor_name = from_key_arrangement(val, key_arrangement)
|
||||
if flavor_name is not None:
|
||||
ret['flavor'] = flavor_name
|
||||
|
||||
key_arrangement = ['properties', 'sw_image_data', 'name']
|
||||
image_name = from_key_arrangement(val, key_arrangement)
|
||||
if image_name is not None:
|
||||
ret['image'] = image_name
|
||||
|
||||
key_arrangement = ['properties', 'boot_order', 0]
|
||||
boot_volume = from_key_arrangement(val, key_arrangement)
|
||||
if boot_volume is not None:
|
||||
ret['boot_volume'] = boot_volume
|
||||
|
||||
volumes = get_volumes(val)
|
||||
if len(volumes) > 0:
|
||||
ret['volumes'] = volumes
|
||||
return ret
|
||||
|
||||
|
||||
def generate_vdu_block_dict(val):
|
||||
ret = dict()
|
||||
key_arrangement = ['properties', 'sw_image_data', 'name']
|
||||
image_name = from_key_arrangement(val, key_arrangement)
|
||||
if image_name is not None:
|
||||
ret['image'] = image_name
|
||||
key = ('properties', 'virtual_block_storage_data', 'size_of_storage')
|
||||
volume_size = from_key_arrangement(val, key)
|
||||
if volume_size is not None:
|
||||
tmp = volume_size.split(" ", 1)
|
||||
front = float(tmp[0])
|
||||
end = "GB"
|
||||
if len(tmp) >= 2:
|
||||
end = tmp[1]
|
||||
if end == "PB":
|
||||
front *= 1000 * 1000
|
||||
elif end == "TB":
|
||||
front *= 1000
|
||||
elif end == "MB":
|
||||
front /= 1000
|
||||
elif end == "KB":
|
||||
front /= 1000 * 1000
|
||||
elif end == "B":
|
||||
front /= 1000 * 1000 * 1000
|
||||
ret['size'] = int(front)
|
||||
return ret
|
||||
|
||||
|
||||