summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml261
-rw-r--r--docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml207
-rw-r--r--docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml1146
-rw-r--r--tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml10
-rw-r--r--tosca2heat/tosca-parser/toscaparser/elements/nodetype.py20
-rw-r--r--tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml5
7 files changed, 773 insertions, 880 deletions
diff --git a/.gitignore b/.gitignore
index 2884629..33a0451 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
*~
.*.sw?
-/build/
-/output/
+/docs_build/
+/docs_output/
/releng/
diff --git a/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml b/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml
index 9f99c57..e22a1c8 100644
--- a/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml
+++ b/docs/parser_docs/tosca2heat/examples/Simple_RNC.yaml
@@ -1,9 +1,22 @@
+#
+## 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.
+
# Required TOSCA Definitions version string
-tosca_definitions_version: tosca_simple_yaml_1_0
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
metadata:
- template_name: tosca_simple_profile_for_nfv
- template_author: opnfv_parser_project
+ template_name: tosca_simple_profile_for_nfv_vRNC
+ template_author: opnfv_parser_project_from_zte
template_version: tosca_simple_profile_for_nfv_1_0
# Optional description of the definitions inside the file.
@@ -61,12 +74,16 @@ topology_template:
default: 40 GB
description: mm additional block storage size
constraints:
- - valid_values: [ 10, 20, 40, 80 ]
+ - in_range: [ 1, 200 ]
substitution_mappings:
- type: rnc.nodes.VNF
+ node_type: rnc.nodes.VNF
properties:
- vnfmtype: RADIO
+ vnfmtype: TDS-CDMA
+ requirements:
+ virtualLink_VNFM: [ MM_Port_CTRL, virtualLink ]
+ virtualLink_EMS: [ MM_Port_EMS, virtualLink ]
+ virtualLink_TRAFFIC: [ LB_Port_EXTERMEDIA, virtualLink ]
# definition of the node templates of the topology
node_templates:
@@ -74,8 +91,15 @@ topology_template:
type: rnc.nodes.compute.MM
properties:
activestatus: 1
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_MM
requirements:
- - host: MM_Active_Host
+ - local_storage:
+ node: MM_BlockStorage
+ relationship: Storage_attachesto
- high_availability: MM_Passive
artifacts:
#the VM image of MM
@@ -86,13 +110,22 @@ topology_template:
implementation: mm_install.sh
configure:
implementation: mm_active_configure.sh
+ attributes:
+ ip_address: { get_attribute: [ SELF, private_address ] }
MM_Passive:
type: rnc.nodes.compute.MM
properties:
activestatus: 0
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_MM
requirements:
- - host: MM_Passive_Host
+ - local_storage:
+ node: MM_BlockStorage
+ relationship: Storage_attachesto
- high_availability: MM_Active
artifacts:
#the VM image of MM
@@ -103,31 +136,24 @@ topology_template:
implementation: mm_install.sh
configure:
implementation: mm_passvie_configure.sh
-
- MM_Active_Host:
- type: rnc.nodes.compute.MM_Host
- capabilities:
- os:
- properties: *compute_props_os_DEF
- host:
- properties: *compute_props_host_MM
- requirements:
- - local_storage:
- node: MM_BlockStorage
- relationship: Storage_attachesto
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
- MM_Passive_Host:
- type: rnc.nodes.compute.MM_Host
- copy: MM_Active_Host
-
CM_Active:
type: rnc.nodes.compute.CM
properties:
activestatus: 1
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_CM
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 126
+ default_instances: 1
requirements:
- - host: CM_Active_Host
- high_availability: CM_Passive
artifacts:
#the VM image of CM
@@ -138,13 +164,24 @@ topology_template:
implementation: cm_install.sh
configure:
implementation: cm_active_configure.sh
+ attributes:
+ ip_address: { get_attribute: [ SELF, private_address ] }
CM_Passive:
type: rnc.nodes.compute.CM
properties:
activestatus: 0
+ capabilities:
+ os:
+ properties: *compute_props_os_DEF
+ host:
+ properties: *compute_props_host_CM
+ scalable:
+ properties:
+ min_instances: 1
+ max_instances: 126
+ default_instances: 1
requirements:
- - host: CM_Passive_Host
- high_availability: CM_Active
artifacts:
#the VM image of CM
@@ -155,30 +192,21 @@ topology_template:
implementation: cm_install.sh
configure:
implementation: cm_passvie_configure.sh
+ attributes:
+ ip_address: { get_attribute: [ SELF, private_address ] }
- CM_Active_Host:
- type: rnc.nodes.compute.CM_Host
+ DM:
+ type: rnc.nodes.compute.DM
capabilities:
os:
properties: *compute_props_os_DEF
host:
- properties: *compute_props_host_CM
+ properties: *compute_props_host_DM
scalable:
properties:
min_instances: 1
- max_instances: 126
+ max_instances: 120
default_instances: 1
- attributes:
- ip_address: { get_attribute: [ SELF, private_address ] }
-
- CM_Passive_Host:
- type: rnc.nodes.compute.MM_Host
- copy: CM_Active_Host
-
- DM:
- type: rnc.nodes.compute.DM
- requirements:
- - host: DM_Host
artifacts:
vm_image: dm.image
interfaces:
@@ -187,26 +215,21 @@ topology_template:
implementation: dm_install.sh
configure:
implementation: dm_configure.sh
+ attributes:
+ ip_address: { get_attribute: [ SELF, private_address ] }
- DM_Host:
- type: rnc.nodes.compute.DM_Host
+ LB:
+ type: rnc.nodes.compute.LB
capabilities:
os:
properties: *compute_props_os_DEF
host:
- properties: *compute_props_host_DM
+ properties: *compute_props_host_LB
scalable:
properties:
min_instances: 1
- max_instances: 120
+ max_instances: 20
default_instances: 1
- attributes:
- ip_address: { get_attribute: [ SELF, private_address ] }
-
- LB:
- type: rnc.nodes.compute.LB
- requirements:
- - host: LB_Host
artifacts:
#the VM image of LB
vm_image: lb.image
@@ -216,19 +239,6 @@ topology_template:
implementation: lb_install.sh
configure:
implementation: lb_configure.sh
-
- LB_Host:
- type: rnc.nodes.compute.LB_Host
- capabilities:
- os:
- properties: *compute_props_os_DEF
- host:
- properties: *compute_props_host_LB
- scalable:
- properties:
- min_instances: 1
- max_instances: 20
- default_instances: 1
attributes:
ip_address: { get_attribute: [ SELF, private_address ] }
@@ -241,64 +251,80 @@ topology_template:
post_configure_target:
implementation: default_script.sh
- CTRL_NetWork:
+ CTRL_Net:
type: rnc.nodes.VL
properties:
- vendor: "zte"
+ vendor: ZTE
cidr: "128.0.0.0/8"
- network_name: net1
+ network_name: Ctrl_Net
+ network_type: vlan
+ segmentation_id: 110
dhcp_enabled: false
- INTERMEDIA_NetWork:
+ INTERMEDIA_Net:
type: rnc.nodes.VL
properties:
- vendor: "zte"
- cidr: "10.0.0.0/8"
- network_name: net3
- dhcp_enabled: true
+ vendor: ZTE
+ cidr: 10.0.0.0/8
+ start_ip: 10.1.0.1
+ end_ip: 10.1.2.254
+ network_name: InterMedia_Net
+ network_type: vlan
+ segmentation_id: 111
+ dhcp_enabled: false
- EXTERMEDIA_NetWork:
+ EXTERMEDIA_Net:
type: rnc.nodes.VL
properties:
- vendor: "zte"
- cidr: "172.1.0.0/20"
- network_name: net2
- dhcp_enabled: true
+ vendor: ZTE
+ cidr: 172.1.0.0/16
+ start_ip: 172.1.0.2
+ end_ip: 172.1.2.254
+ gateway_ip: 172.1.0.1
+ network_name: ExterMdedia_Net
+ network_type: vlan
+ segmentation_id: 100
+ dhcp_enabled: false
- EMS_NetWork:
+ EMS_Net:
type: rnc.nodes.VL
properties:
- vendor: "zte"
- cidr: "129.0.0.0/8"
- network_name: net2
- dhcp_enabled: true
+ vendor: ZTE
+ cidr: 129.0.0.0/24
+ start_ip: 129.0.0.2
+ end_ip: 129.0.0.64
+ gateway_ip: 129.0.0.1
+ network_name: Ems_Net
+ network_type: vlan
+ segmentation_id: 101
+ dhcp_enabled: false
MM_Port_EMS:
type: rnc.nodes.CP
properties:
- order: 1
+ order: 0
is_default: true
requirements:
- virtualbinding: MM_Active
- - virtualLink: EMS_NetWork
+ - virtualLink: EMS_Net
MM_Port_CTRL:
type: rnc.nodes.CP
properties:
- order: 0
- is_default: true
+ order: 1
+ is_default: false
requirements:
- virtualbinding: MM_Active
- - virtualLink: CTRL_NetWork
+ - virtualLink: CTRL_Net
MM_Port_EXTERMEDIA:
type: rnc.nodes.CP
properties:
order: 2
- is_default: true
+ is_default: false
requirements:
- virtualbinding: MM_Active
- - virtualLink: EXTERMEDIA_NetWork
+ - virtualLink: EXTERMEDIA_Net
CM_Port_CTRL:
type: rnc.nodes.CP
@@ -307,7 +333,7 @@ topology_template:
is_default: true
requirements:
- virtualbinding: CM_Active
- - virtualLink: CTRL_NetWork
+ - virtualLink: CTRL_Net
CM_Port_INTERMEDIA:
type: rnc.nodes.CP
@@ -316,7 +342,7 @@ topology_template:
is_default: false
requirements:
- virtualbinding: CM_Active
- - virtualLink: INTERMEDIA_NetWork
+ - virtualLink: INTERMEDIA_Net
DM_Port_CTRL:
type: rnc.nodes.CP
@@ -325,7 +351,7 @@ topology_template:
is_default: true
requirements:
- virtualbinding: DM
- - virtualLink: CTRL_NetWork
+ - virtualLink: CTRL_Net
DM_Port_INTERMEDIA:
type: rnc.nodes.CP
@@ -334,7 +360,7 @@ topology_template:
is_default: false
requirements:
- virtualbinding: DM
- - virtualLink: INTERMEDIA_NetWork
+ - virtualLink: INTERMEDIA_Net
LB_Port_CTRL:
type: rnc.nodes.CP
@@ -343,7 +369,7 @@ topology_template:
is_default: true
requirements:
- virtualbinding: LB
- - virtualLink: CTRL_NetWork
+ - virtualLink: CTRL_Net
LB_Port_INTERMEDIA:
type: rnc.nodes.CP
@@ -352,7 +378,7 @@ topology_template:
is_default: false
requirements:
- virtualbinding: LB
- - virtualLink: INTERMEDIA_NetWork
+ - virtualLink: INTERMEDIA_Net
LB_Port_EXTERMEDIA:
type: rnc.nodes.CP
@@ -361,46 +387,65 @@ topology_template:
is_default: false
requirements:
- virtualbinding: LB
- - virtualLink: EXTERMEDIA_NetWork
+ - virtualLink: EXTERMEDIA_Net
# definition of the relationship templates of the topology
relationship_templates:
Storage_attachesto:
type: tosca.relationships.AttachesTo
properties:
- location: /data_location
+ location: /data_location
# definition of output parameters for the topology template
outputs:
private_ip_of_MM:
description: The private IP address of the MM.
- value: { get_attribute: [ MM_Active_Host, ip_address ] }
+ value: { get_attribute: [ MM_Active, ip_address ] }
private_ip_of_CM:
description: The private IP address of the CM.
- value: { get_attribute: [ CM_Active_Host, ip_address ] }
+ value: { get_attribute: [ CM_Active, ip_address ] }
private_ip_of_DM:
description: The private IP address of the DM.
- value: { get_attribute: [ DM_Host, ip_address ] }
+ value: { get_attribute: [ DM, ip_address ] }
private_ip_of_LB:
description: The private IP address of the LB.
- value: { get_attribute: [ LB_Host, ip_address ] }
+ value: { get_attribute: [ LB, ip_address ] }
# definition of logical groups of node templates within the topology
# To be continue about this section
groups:
- ServerGroupAnitAffinity: #
- description: Logical component grouping for placement
+ AnitAffinityServerGroup:
+ type: tosca.groups.Root
+ description: >
+ Logical component grouping for anti affinity placement,
+ MM_Acitve, MM_Passive, CM_Acitve, CM_Passive, LB must host
+ on different host to reduce the impact to each other.
members: [ MM_Acitve, MM_Passive, CM_Acitve, CM_Passive, LB ]
policies:
type: tosca.policy.placement.Antilocate
- # ServerGroupAffinity: #
- # members: [ CM, DM ]
- # policies:
- # type: tosca.policy.placement.Antilocate
+ AffinityServerGroup:
+ type: tosca.groups.Root
+ description: >
+ Logical component grouping for affinity placement,
+ CM and DM will be host on the same host to get high performence
+ members: [ CM, DM ]
+ policies:
+ type: tosca.policy.placement.Antilocate
+
+ policies:
+ - AnitAffinityPolicy:
+ type: tosca.policies.Placement.Antilocate
+ description: Apply anti-locate placement policy to group
+ targets: [ AnitAffinityServerGroup ]
+
+ - AffinityPolicy:
+ type: tosca.policies.Placement.Colocate
+ description: Apply anti-locate placement policy to group
+ targets: [ AffinityServerGroup ]
# ServerGroupScaling_DM: # added future
# members: [ DM, ]# only one, will be error
diff --git a/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml b/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml
index 921da0d..b3dfd55 100644
--- a/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml
+++ b/docs/parser_docs/tosca2heat/examples/Simple_RNC_definition.yaml
@@ -1,9 +1,22 @@
+#
+## 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.
+
# Required TOSCA Definitions version string
-tosca_definitions_version: tosca_simple_yaml_1_0
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
metadata:
- template_name: tosca_simple_profile_for_nfv
- template_author: opnfv_parser_project
+ template_name: tosca_simple_profile_for_nfv_vRNC
+ template_author: opnfv_parser_project_from_zte
template_version: tosca_simple_profile_for_nfv_1_0
# Optional description of the definitions inside the file.
@@ -13,11 +26,13 @@ description: >
1.1 MM: MaintainModule;
1.2 CM: Control Module;
1.3 DM: Data Module;
- 1.4 LB: LineCard Module
+ 1.4 LB: LineCard Module.
2, Network Node VL and CP
-imports:
- - TOSCA_nfv_definition_1_0.yaml
+# The import section shall be ignored if the value of tosca_definitions_version
+# is tosca_simple_profile_for_nfv_1_0_0, otherwise will be needed.
+#imports:
+# - TOSCA_nfv_definition_1_0.yaml
# list of node type definitions
node_types:
@@ -30,23 +45,28 @@ node_types:
default: UMTS
required: false
constraints:
- - valid_values: [ TD, UMTS ]
+ - valid_values: [ TDS-CDMA, UMTS, CDMA ]
requirements:
- virtualLink_VNFM:
capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: tosca.nodes.nfv.VL
- virtualLink_EMS:
capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: tosca.nodes.nfv.VL
- virtualLink_TRAFFIC:
capability: tosca.capabilities.nfv.VirtualLinkable
-
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: tosca.nodes.nfv.VL
+
rnc.nodes.compute.MM:
derived_from: tosca.nodes.nfv.VDU
properties:
activestatus:
type: integer
- description: active or passive
+ description: 1 for active or 0 for passive
constraints:
- # 1 active, 0 passive
- valid_values: [ 0, 1 ]
id:
type: string
@@ -55,30 +75,6 @@ node_types:
A identifier of this VDU within the scope of the VNFD,
including version functional description and other
identification information.
- requirements:
- - host:
- capability: tosca.capabilities.Container
- node: rnc.nodes.compute.MM_Host
- relationship: tosca.relationships.HostedOn
-
- rnc.nodes.compute.MM_Host:
- derived_from: tosca.nodes.Compute
- capabilities:
- binding:
- type: tosca.capabilities.network.Bindable
- os:
- type: tosca.capabilities.OperatingSystem
- scalable:
- type: tosca.capabilities.Scalable
- host:
- type: rnc.capabilities.Container
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- storage:
- type: tosca.capabilities.nfv.Storage
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- attributes:
- ip_address:
- type: string
rnc.nodes.compute.CM:
derived_from: tosca.nodes.nfv.VDU
@@ -87,161 +83,22 @@ node_types:
type: integer
description: 1 for active or 0 for passive
constraints:
- # 1 active, 0 passive
- - valid_values: [ 0, 1 ]
- requirements:
- - host:
- capability: tosca.capabilities.Container
- node: rnc.nodes.compute.CM_Host
- relationship: tosca.relationships.HostedOn
-
- rnc.nodes.compute.CM_Host:
- derived_from: tosca.nodes.Compute
- capabilities:
- binding:
- type: tosca.capabilities.network.Bindable
- os:
- type: tosca.capabilities.OperatingSystem
- scalable:
- type: tosca.capabilities.Scalable
- host:
- type: rnc.capabilities.Container
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- cpu_extension:
- type: tosca.capabilities.nfv.CPU_extension
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- memory_extension:
- type: tosca.capabilities.nfv.Memory_extension
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- hypervisors:
- type: tosca.capabilities.nfv.Hypervisors
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- PCIe:
- type: tosca.capabilities.nfv.PCIe
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- interfaces:
- type: tosca.capabilities.nfv.network.Interfaces
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- virtual_switches:
- type: tosca.capabilities.nfv.network.Virtual_switches
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- attributes:
- ip_address:
- type: string
+ - valid_values: [ 0, 1 ]
rnc.nodes.compute.DM:
derived_from: tosca.nodes.nfv.VDU
- requirements:
- - host:
- capability: tosca.capabilities.Container
- node: rnc.nodes.compute.DM_Host
- relationship: tosca.relationships.HostedOn
-
- rnc.nodes.compute.DM_Host:
- derived_from: tosca.nodes.Compute
- capabilities:
- binding:
- type: tosca.capabilities.network.Bindable
- os:
- type: tosca.capabilities.OperatingSystem
- scalable:
- type: tosca.capabilities.Scalable
- host:
- type: rnc.capabilities.Container
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- cpu_extension:
- type: tosca.capabilities.nfv.CPU_extension
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- memory_extension:
- type: tosca.capabilities.nfv.Memory_extension
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- hypervisors:
- type: tosca.capabilities.nfv.Hypervisors
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- PCIe:
- type: tosca.capabilities.nfv.PCIe
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- interfaces:
- type: tosca.capabilities.nfv.network.Interfaces
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- virtual_switches:
- type: tosca.capabilities.nfv.network.Virtual_switches
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- attributes:
- ip_address:
- type: string
rnc.nodes.compute.LB:
derived_from: tosca.nodes.nfv.VDU
- requirements:
- - host:
- capability: tosca.capabilities.Container
- node: rnc.nodes.compute.LB_Host
- relationship: tosca.relationships.HostedOn
-
- rnc.nodes.compute.LB_Host:
- derived_from: tosca.nodes.Compute
- capabilities:
- binding:
- type: tosca.capabilities.network.Bindable
- os:
- type: tosca.capabilities.OperatingSystem
- scalable:
- type: tosca.capabilities.Scalable
- host:
- type: rnc.capabilities.Container
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- interfaces:
- type: tosca.capabilities.nfv.network.Interfaces
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- virtual_switches:
- type: tosca.capabilities.nfv.network.Virtual_switches
- valid_source_types: [ tosca.nodes.SoftwareComponent ]
- attributes:
- ip_address:
- type: string
rnc.nodes.BlockStorage:
derived_from: tosca.nodes.BlockStorage
rnc.nodes.VL:
- derived_from: tosca.nodes.nfv.VL.ELAN
- properties:
- ip_version:
- type: integer
- required: false
- default: 4
- constraints:
- - valid_values: [ 4, 6 ]
- cidr:
- type: string
- required: false
- network_name:
- type: string
- required: false
- dhcp_enabled:
- type: boolean
- required: false
- default: true
- description: >
- Indicates should DHCP service be enabled on the network or not.
+ derived_from: tosca.nodes.nfv.VL
rnc.nodes.CP:
derived_from: tosca.nodes.nfv.CP
- properties:
- ip_address:
- type: string
- required: false
- order:
- type: integer
- required: true
- default: 0
- constraints:
- - greater_or_equal: 0
- is_default:
- type: boolean
- required: false
- default: false
# list of capability type definitions
capability_types:
diff --git a/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml b/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml
index 432cee5..c535144 100644
--- a/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml
+++ b/docs/parser_docs/tosca2heat/examples/TOSCA_nfv_definition_1_0.yaml
@@ -1,8 +1,8 @@
-# Licensed :under the Apache License, Version 2.0 (the "License"); you may
+# 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
+# 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
@@ -10,600 +10,600 @@
# License for the specific language governing permissions and limitations
# under the License.
-###########################################################################
-# The content of this file reflects TOSCA nfv Profile in YAML version
+##########################################################################
+# The content of this file reflects TOSCA NFV Profile in YAML version
# 1.0.0, which is derived from TOSCA Simple Profile. It describes the
# definition for nfv TOSCA types including Node Type,
# Relationship Type, Capability Type and Interfaces.
-###########################################################################
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-metadata:
- template_name: tosca_simple_profile_for_nfv
- template_author: opnfv_parser_project
- template_version: tosca_simple_profile_for_nfv_1_0
+##########################################################################
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
-###########################################################################
+##########################################################################
# Node Type.
# A Node Type is a reusable entity that defines the type of one or more
# Node Templates.
-###########################################################################
-node_types:
- tosca.nodes.nfv.VNF:
- derived_from: tosca.nodes.Root
- properties:
- id:
- type: string
- description: ID of this VNF
- vendor:
- type: string
- description: name of the vendor which provides this VNF
- version:
- type: version
- description: version of the software for this VNF
- requirements:
- - virtualLink:
- capability: tosca.capabilities.nfv.VirtualLinkable
-
- tosca.nodes.nfv.VDU:
- derived_from: tosca.nodes.SoftwareComponent
- properties:
- id:
- type: string
- required: true
- description: >
- A unique identifier of this VDU within the scope
- of the VNFD, including version functional
- description and other identification information.
- This will be used to refer to VDU when defining
- relationships between them.
- capabilities:
- high_availability:
- type: tosca.capabilities.nfv.HA
- virtualbinding:
- type: tosca.capabilities.nfv.VirtualBindable
- monitoring_parameter:
- type: tosca.capabilities.nfv.Metric
- requirements:
- - high_availability:
- capability: tosca.capabilities.nfv.HA
- relationship: tosca.relationships.nfv.HA
- occurrences: [ 0, 1 ]
- - host:
- capability: tosca.capabilities.Container
- node: tosca.nodes.Compute
- relationship: tosca.relationships.HostedOn
-
- tosca.nodes.nfv.CP:
- derived_from: tosca.nodes.Root
- properties:
- type:
- type: string
- required: false
- attributes:
- IP_address:
- type: string
- required: false
- requirements:
- - virtualLink:
- capability: tosca.capabilities.nfv.VirtualLinkable
- - virtualbinding:
- capability: tosca.capabilities.nfv.Virtualbindable
-
- tosca.nodes.nfv.VL:
- derived_from: tosca.nodes.Root
- properties:
- vendor:
- type: string
- required: true
- description: name of the vendor who generate this VL
- capabilities:
- virtual_linkable:
- type: tosca.capabilities.nfv.VirtualLinkable
-
- tosca.nodes.nfv.VL.ELine:
- derived_from: tosca.nodes.nfv.VL
- capabilities:
- virtual_linkable:
- occurrences: 2
-
- tosca.nodes.nfv.VL.ELAN:
- derived_from: tosca.nodes.nfv.VL
-
- tosca.nodes.nfv.VL.ETree:
- derived_from: tosca.nodes.nfv.VL
-
- tosca.nodes.nfv.FP:
- derived_from: tosca.nodes.Root
- properties:
- policy:
- type: string
- required: false
- description: name of the vendor who generate this VL
- requirements:
- - forwarder:
- capability: tosca.capabilities.nfv.Forwarder
+##########################################################################
+
+tosca.nodes.nfv.VNF:
+ derived_from: tosca.nodes.Root
+ properties:
+ id:
+ type: string
+ description: ID of this VNF
+ vendor:
+ type: string
+ description: name of the vendor who generate this VNF
+ version:
+ type: version
+ description: version of the software for this VNF
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: tosca.nodes.nfv.VL
+
+tosca.nodes.nfv.VDU:
+ derived_from: tosca.nodes.Compute
+ properties:
+ id:
+ type: string
+ required: true
+ description: >
+ A unique identifier of this VDU within the scope
+ of the VNFD, including version functional
+ description and other identification information.
+ This will be used to refer to VDU when defining
+ relationships between them.
+ capabilities:
+ high_availability:
+ type: tosca.capabilities.nfv.HA
+ virtualbinding:
+ type: tosca.capabilities.nfv.VirtualBindable
+ monitoring_parameter:
+ type: tosca.capabilities.nfv.Metric
+ requirements:
+ - high_availability:
+ capability: tosca.capabilities.nfv.HA
+ relationship: tosca.relationships.nfv.HA
+ node: tosca.nodes.nfv.VDU
+ occurrences: [ 0, 1 ]
+
+tosca.nodes.nfv.CP:
+ derived_from: tosca.nodes.network.Port
+ description: >
+ The NFV CP node represents a logical connection point
+ entity as defined by ETSI GS NFV-MAN
+ properties:
+ type:
+ type: string
+ required: false
+ requirements:
+ - virtualLink:
+ capability: tosca.capabilities.nfv.VirtualLinkable
+ relationship: tosca.relationships.nfv.VirtualLinksTo
+ node: tosca.nodes.nfv.VL
+ - virtualBinding:
+ capability: tosca.capabilities.nfv.VirtualBindable
+ relationship: tosca.relationships.nfv.VirtualBindsTo
+ node: tosca.nodes.nfv.VDU
+
+tosca.nodes.nfv.VL:
+ derived_from: tosca.nodes.network.Network
+ properties:
+ vendor:
+ type: string
+ required: true
+ description: name of the vendor who generate this VL
+ capabilities:
+ virtual_linkable:
+ type: tosca.capabilities.nfv.VirtualLinkable
+
+tosca.nodes.nfv.VL.ELine:
+ derived_from: tosca.nodes.nfv.VL
+ capabilities:
+ virtual_linkable:
+ occurrences: 2
+
+tosca.nodes.nfv.VL.ELAN:
+ derived_from: tosca.nodes.nfv.VL
+
+tosca.nodes.nfv.VL.ETree:
+ derived_from: tosca.nodes.nfv.VL
+
+tosca.nodes.nfv.FP:
+ derived_from: tosca.nodes.Root
+ properties:
+ policy:
+ type: string
+ required: false
+ description: name of the vendor who generate this VL
+ requirements:
+ - forwarder:
+ capability: tosca.capabilities.nfv.Forwarder
+ relationship: tosca.relationships.nfv.ForwardsTo
+
+##########################################################################
+# Relationship Type.
+# A Relationship Type is a reusable entity that defines the type of one
+# or more relationships between Node Types or Node Templates.
+##########################################################################
+
+tosca.relationships.nfv.VirtualLinksTo:
+ derived_from: tosca.relationships.network.LinksTo
+ valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ]
+
+tosca.relationships.nfv.VirtualBindsTo:
+ derived_from: tosca.relationships.network.BindsTo
+ valid_target_types: [ tosca.capabilities.nfv.VirtualBindable ]
+
+tosca.relationships.nfv.HA:
+ derived_from: tosca.relationships.Root
+ valid_target_types: [ tosca.capabilities.nfv.HA ]
+
+tosca.relationships.nfv.Monitor:
+ derived_from: tosca.relationships.ConnectsTo
+ valid_target_types: [ tosca.capabilities.nfv.Metric ]
+
+tosca.relationships.nfv.ForwardsTo:
+ derived_from: tosca.relationships.root
+ valid_target_types: [ tosca.capabilities.nfv.Forwarder]
##########################################################################
# Capability Type.
# A Capability Type is a reusable entity that describes a kind of
# capability that a Node Type can declare to expose.
##########################################################################
-capability_types:
- tosca.capabilities.nfv.VirtualBindable:
- derived_from: tosca.capabilities.Root
-
- tosca.capabilities.nfv.HA:
- derived_from: tosca.capabilities.Root
- valid_source_types: [ tosca.nodes.nfv.VDU ]
-
- tosca.capabilities.nfv.HA.ActiveActive:
- derived_from: tosca.capabilities.nfv.HA
-
- tosca.capabilities.nfv.HA.ActivePassive:
- derived_from: tosca.capabilities.nfv.HA
-
- tosca.capabilities.nfv.Metric:
- derived_from: tosca.capabilities.Root
-
- tosca.capabilities.nfv.Forwarder:
- derived_from: tosca.capabilities.Root
-
- tosca.capabilities.nfv.VirtualLinkable:
- derived_from: tosca.capabilities.Root
-
- tosca.capabilities.nfv.CPU_extension:
- derived_from: tosca.capabilities.Root
- properties:
- cpu_instruction_set_extension:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- Instruction sets are often enhanced with
- instruction set extensions. This element
- represents instruction set extensions that the
- VDU has been developed, optimized or tested with
- cpu_model:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The CPU model for which the VDU has been
- developed, compiled with CPU model specific
- optimisations, optimized or validated on.
- cpu_model_specification_binding:
+
+tosca.capabilities.nfv.VirtualLinkable:
+ derived_from: tosca.capabilities.network.Linkable
+
+tosca.capabilities.nfv.VirtualBindable:
+ derived_from: tosca.capabilities.network.Bindable
+
+tosca.capabilities.nfv.HA:
+ derived_from: tosca.capabilities.Root
+ valid_source_types: [ tosca.nodes.nfv.VDU ]
+
+tosca.capabilities.nfv.HA.ActiveActive:
+ derived_from: tosca.capabilities.nfv.HA
+
+tosca.capabilities.nfv.HA.ActivePassive:
+ derived_from: tosca.capabilities.nfv.HA
+
+tosca.capabilities.nfv.Metric:
+ derived_from: tosca.capabilities.Root
+
+tosca.capabilities.nfv.Forwarder:
+ derived_from: tosca.capabilities.Root
+
+
+
+tosca.capabilities.nfv.CPU_extension:
+ derived_from: tosca.capabilities.Root
+ properties:
+ cpu_instruction_set_extension:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- VDUs may be developed, compiled, optimized
- or validated on particular CPU models. Some
- deployments may wish to permit the VDU to
- be deployed on a platform with the specified
- CPU only, or with an alternative CPU with the
- same architecture, instruction set, and if
- specified, instruction set extensions, or with a
- CPU of equivalent or greater capability.
- cpu_min_clock_speed:
+ constraints:
+ - min_length: 1
+ description: >
+ Instruction sets are often enhanced with
+ instruction set extensions. This element
+ represents instruction set extensions that the
+ VDU has been developed, optimized or tested with
+ cpu_model:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The minimum CPU clock speed may be one of
- the elements that the development and
- validation of the VDU has been considered
- with. This may be in conjunction with some of
- the other CPU elements such as CPU Model.
- Requiring a minimum clock speed may be part
- of a deployment requirement necessary to
- help ensure particular performance or timing
- related characteristics are met in the
- deployment.
- cpu_core_reservation:
+ constraints:
+ - min_length: 1
+ description: >
+ The CPU model for which the VDU has been
+ developed, compiled with CPU model specific
+ optimisations, optimized or validated on.
+ cpu_model_specification_binding:
+ type: string
+ required: false
+ description: >
+ VDUs may be developed, compiled, optimized
+ or validated on particular CPU models. Some
+ deployments may wish to permit the VDU to
+ be deployed on a platform with the specified
+ CPU only, or with an alternative CPU with the
+ same architecture, instruction set, and if
+ specified, instruction set extensions, or with a
+ CPU of equivalent or greater capability.
+ cpu_min_clock_speed:
+ type: string
+ required: false
+ description: >
+ The minimum CPU clock speed may be one of
+ the elements that the development and
+ validation of the VDU has been considered
+ with. This may be in conjunction with some of
+ the other CPU elements such as CPU Model.
+ Requiring a minimum clock speed may be part
+ of a deployment requirement necessary to
+ help ensure particular performance or timing
+ related characteristics are met in the
+ deployment.
+ cpu_core_reservation:
+ type: string
+ required: false
+ description: >
+ The number of CPU cores allocated to the
+ VDU. This may be necessary to help ensure
+ particular performance or timing related
+ characteristics are met in the deployment.
+ cpu_simultaneous_multi_threading_hw_thread_specification:
+ type: string
+ required: false
+ description: >
+ The use of Simultaneous Multi-Threading HW
+ is an efficient way to increase the compute
+ capacity of a platform. SMT HW threads share
+ some CPU core resources. In some VDU
+ implementations, it may be necessary to very
+ explicitly control the HW thread allocation on a
+ platform. This could be to help ensure locality
+ in data caches or as a mechanism to enhance
+ determinism.
+ cpu_core_oversubscription_policy:
+ type: string
+ required: false
+ description: >
+ The VDU may co-exist on a platform with
+ multiple VDUs or VMs and as such will be
+ sharing CPU core resources available in the
+ platform. It may be necessary to specify the
+ CPU core oversubscription policy in terms of
+ virtual cores to physical cores/threads on the
+ platform. This policy could be based on
+ required VDU deployment characteristics such
+ as high performance, low latency, and /or
+ deterministic behaviour.
+ cpu_core_and_hw_thread_allocation_topology_policy:
+ type: string
+ required: false
+ description: >
+ The VDU may be designed to use a specific
+ mapping of virtual CPUs to HW threads or
+ cores with a specific allocation topology in
+ order to ensure locality in data caches and
+ maximize performance. The VDU will not
+ specify which physical resources to use, but
+ may specify if virtual CPUs shall be coupled
+ together as HW threads belonging to the same
+ core, or as belonging to the same processor.
+ cpu_last_level_cache_size:
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 KB
+ description: >
+ The size of the last level cache may impact the
+ performance of the VDU, particularly for cache
+ intensive workloads.
+ cpu_direct_io_access_to_cache:
+ type: string
+ required: false
+ description: >
+ The ability of an I/O device to have direct
+ access to the CPU cache enables
+ considerable memory access savings and for
+ I/O intensive workloads can offer significant
+ performance benefits.
+ cpu_translation_look_aside_buffer_parameter:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The number of CPU cores allocated to the
- VDU. This may be necessary to help ensure
- particular performance or timing related
- characteristics are met in the deployment.
- cpu_simultaneous_multi_threading_hw_thread_specification:
+ constraints:
+ - min_length: 1
+ description: >
+ The Translation Look-aside Buffer (TLB) is a
+ cache for address translation typically used by
+ a hardware based memory management units.
+ The Input/Output TLB (IOTLB) is a cache for
+ address translation related to remapping
+ hardware. The availability of a TLB and an
+ IOTLB can significantly improve the
+ performance of a virtual machine.
+ A number of parameters of the TLBs impact
+ the performance potential. These include:
+ 1 TLB Size.
+ 2 TLB Large Page Support.
+ 3 IOTLB Size.
+ 4 IOTLB Large Page Support.
+ cpu_hot_add:
+ type: boolean
+ required: false
+ description: >
+ Hot add CPU is the ability to dynamically add
+ CPUs to a running system. The new CPU can
+ immediately replace a failing CPU via
+ migration or be brought on-line later.
+ cpu_support_accelerator:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The use of Simultaneous Multi-Threading HW
- is an efficient way to increase the compute
- capacity of a platform. SMT HW threads share
- some CPU core resources. In some VDU
- implementations, it may be necessary to very
- explicitly control the HW thread allocation on a
- platform. This could be to help ensure locality
- in data caches or as a mechanism to enhance
- determinism.
- cpu_core_oversubscription_policy:
+ constraints:
+ - min_length: 1
+ description: >
+ This capability refers to support by the CPU
+ and associated chipsets of a data processing
+ accelerator framework, together with its
+ libraries and drivers.
+
+tosca.capabilities.nfv.Memory_extension:
+ derived_from: tosca.capabilities.Root
+ properties:
+ memory_parameter:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The VDU may co-exist on a platform with
- multiple VDUs or VMs and as such will be
- sharing CPU core resources available in the
- platform. It may be necessary to specify the
- CPU core oversubscription policy in terms of
- virtual cores to physical cores/threads on the
- platform. This policy could be based on
- required VDU deployment characteristics such
- as high performance, low latency, and /or
- deterministic behaviour.
- cpu_core_and_hw_thread_allocation_topology_policy:
+ constraints:
+ - min_length: 1
+ description: >
+ There are a number of memory related parameters that can have a
+ significant impact on the performance and/or reliability of the VDU.
+ These include:
+ • Memory Type.
+ • Memory Speed
+ • Number of memory channels.
+ • Size of available memory.
+ • Reliability characteristics such as Memory Error Correction
+ codes.
+ • Memory oversubscription policy.
+ • Memory bandwidth required per VDU.
+ • Number of large pages required per VDU
+ • Non-Uniform Memory Architecture (NUMA) Allocation Policy,
+ i.e. in NUMA architecture how you specify memory allocation
+ that is cognisant of the relevant process/core allocation. This
+ applies also to allocation of huge pages.
+ memory_hot_add:
+ type: boolean
+ required: false
+ description: >
+ Hot add memory is the ability to add physical memory while the system
+ is running. Added memory can immediately replace failing memory via
+ migration or be brought on-line later.
+
+tosca.capabilities.nfv.Hypervisors:
+ derived_from: tosca.capabilities.Root
+ properties:
+ hypervisors:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The VDU may be designed to use a specific
- mapping of virtual CPUs to HW threads or
- cores with a specific allocation topology in
- order to ensure locality in data caches and
- maximize performance. The VDU will not
- specify which physical resources to use, but
- may specify if virtual CPUs shall be coupled
- together as HW threads belonging to the same
- core, or as belonging to the same processor.
- cpu_last_level_cache_size:
- type: scalar-unit.size
- required: false
- constraints:
- - greater_or_equal: 0 KB
- description: >
- The size of the last level cache may impact the
- performance of the VDU, particularly for cache
- intensive workloads.
- cpu_direct_io_access_to_cache:
+ constraints:
+ - min_length: 1
+ description: >
+ There are a number of hypervisor related parameters that can have a
+ significant impact on the deployment and performance of the VDU.
+ These include:
+ • Hypervisor type
+ • Hypervisor version as a VDU may be validated with a particular
+ version.
+ • Hypervisor Address Translation support parameters including:
+ o Second Level Address Translation.
+ o Second Level Address Translation with Large page
+ support.
+ o Second Level Address Translation for I/O.
+ o Second Level Address Translation for I/O with Large page.
+ support. Where "Large" is considered to be 1 GB or
+ greater.
+ o Support for interrupt remapping, i.e. supporting the IOMMU
+ in the hypervisor.
+ o Support of data processing acceleration libraries in the
+ hypervisor, i.e. for acceleration libraries which require
+ hypervisor support for high performance.
+
+tosca.capabilities.nfv.PCIe:
+ derived_from: tosca.capabilities.Root
+ properties:
+ platform_pcie_parameter:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- The ability of an I/O device to have direct
- access to the CPU cache enables
- considerable memory access savings and for
- I/O intensive workloads can offer significant
- performance benefits.
- cpu_translation_look_aside_buffer_parameter:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The Translation Look-aside Buffer (TLB) is a
- cache for address translation typically used by
- a hardware based memory management units.
- The Input/Output TLB (IOTLB) is a cache for
- address translation related to remapping
- hardware. The availability of a TLB and an
- IOTLB can significantly improve the
- performance of a virtual machine.
- A number of parameters of the TLBs impact
- the performance potential. These include:
- 1 TLB Size.
- 2 TLB Large Page Support.
- 3 IOTLB Size.
- 4 IOTLB Large Page Support.
- cpu_hot_add:
- type: boolean
- required: false
- description: >
- Hot add CPU is the ability to dynamically add
- CPUs to a running system. The new CPU can
- immediately replace a failing CPU via
- migration or be brought on-line later.
- cpu_support_accelerator:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- This capability refers to support by the CPU
- and associated chipsets of a data processing
- accelerator framework, together with its
- libraries and drivers.
-
- tosca.capabilities.nfv.Memory_extension:
- derived_from: tosca.capabilities.Root
- properties:
- memory_parameter:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- There are a number of memory related parameters that can have a
- significant impact on the performance and/or reliability of the VDU.
- These include:
- • Memory Type.
- • Memory Speed
- • Number of memory channels.
- • Size of available memory.
- • Reliability characteristics such as Memory Error Correction
- codes.
- • Memory oversubscription policy.
- • Memory bandwidth required per VDU.
- • Number of large pages required per VDU
- • Non-Uniform Memory Architecture (NUMA) Allocation Policy,
- i.e. in NUMA architecture how you specify memory allocation
- that is cognisant of the relevant process/core allocation. This
- applies also to allocation of huge pages.
- memory_hot_add:
- type: boolean
- required: false
- description: >
- Hot add memory is the ability to add physical memory while the system
- is running. Added memory can immediately replace failing memory via
- migration or be brought on-line later.
-
- tosca.capabilities.nfv.Hypervisors:
- derived_from: tosca.capabilities.Root
- properties:
- hypervisors:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- There are a number of hypervisor related parameters that can have a
- significant impact on the deployment and performance of the VDU.
- These include:
- • Hypervisor type
- • Hypervisor version as a VDU may be validated with a particular
- version.
- • Hypervisor Address Translation support parameters including:
- o Second Level Address Translation.
- o Second Level Address Translation with Large page
- support.
- o Second Level Address Translation for I/O.
- o Second Level Address Translation for I/O with Large page.
- support. Where "Large" is considered to be 1 GB or
- greater.
- o Support for interrupt remapping, i.e. supporting the IOMMU
- in the hypervisor.
- o Support of data processing acceleration libraries in the
- hypervisor, i.e. for acceleration libraries which require
- hypervisor support for high performance.
-
- tosca.capabilities.nfv.PCIe:
- derived_from: tosca.capabilities.Root
- properties:
- platform_pcie_parameter:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- There are a number of PCIe related parameters that can
- have a significant impact on the deployment and
- performance of the VDU. These include:
- • PCIe generational capabilities.
- • PCIe bandwidth.
- • PCIe Device Pass-through.
- • PCIe SR-IOV as the VDU may require that an SR-
- IOV virtual vunction from the specified PCIe
- device can be allocated to the VM.
- • PCIe Device Assignment Affinity. The VDU may
- require for performance reasons the ability to
- allocate a partitionable PCIe Device capability
- such as a NIC port, an entire NIC or a NIC virtual
- function to the VDU while also ensuring that the
- selected device is locally connected to the same
- processor.
- platform_pcie_parameter:
+ constraints:
+ - min_length: 1
+ description: >
+ There are a number of PCIe related parameters that can
+ have a significant impact on the deployment and
+ performance of the VDU. These include:
+ • PCIe generational capabilities.
+ • PCIe bandwidth.
+ • PCIe Device Pass-through.
+ • PCIe SR-IOV as the VDU may require that an SR-
+ IOV virtual vunction from the specified PCIe
+ device can be allocated to the VM.
+ • PCIe Device Assignment Affinity. The VDU may
+ require for performance reasons the ability to
+ allocate a partitionable PCIe Device capability
+ such as a NIC port, an entire NIC or a NIC virtual
+ function to the VDU while also ensuring that the
+ selected device is locally connected to the same
+ processor.
+ platform_pcie_parameter:
+ type: string
+ required: false
+ description: >
+ Detecting and reporting correctable and un-correctable
+ (fatal and non-fatal) PCIe errors to software for error
+ handling and remediation.
+ platform_acceleration_device:
+ type: list
+ required: false
+ entry_schema:
type: string
- required: false
- description: >
- Detecting and reporting correctable and un-correctable
- (fatal and non-fatal) PCIe errors to software for error
- handling and remediation.
- platform_acceleration_device:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The VDU may have been developed, optimized or
- tested with an acceleration device such as a crypto
- accelerator that may typically be accessed over a PCIe
- bus.
-
- tosca.capabilities.nfv.network.Interfaces:
- derived_from: tosca.capabilities.Root
- properties:
- network_interface_card_capability:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The VDU may have been developed, optimized or
- tested with certain NIC capabilities to benefit items
- such as performance or scalability. These include:
- • TCP Large Segmentation Offload (LSO) for
- offload the segmentation of large TCP
- messages into MTU sized packets from the
- CPU to the NIC.
- • Large Receive Offload (LRO), i.e. the
- inverse of LSO by coalescing incoming
- TCP/IP packets into larger segments for
- processing in the CPU.
- • Checksum Offload.
- • Receive Side Scaling (RSS), for packet
- distribution between cores.
- • Flow Director, for more fine grained (than
- RSS) packet distribution between cores.
- • Mirroring of packets between interfaces.
- • Availability of Independent Rx/Tx queues for
- VM so that queue pairs in the NIC can be
- allocated to the VMs.
- • Jumbo Frame support.
- • VLAN tag stripping.
- • RDMA support.
- • SR-IOV support.
- • Data processing acceleration software
- library support, e.g. DPDK ® - see note.
- network_interface_bandwidth:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The network speed/bandwidth to be guaranteed
- per requested NIC.
- data_processing_acceleration_library:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- Name and version of the data processing
- acceleration library used. Orchestration can match
- any NIC that is known to be compatible with the
- specified library
-
- tosca.capabilities.nfv.network.Virtual_switches:
- derived_from: tosca.capabilities.Root
- properties:
- vswitch_capability:
- type: list
- required: false
- entry_schema:
- type: string
- constraints:
- - min_length: 1
- description: >
- The VDU may have been developed, optimized or tested with a
- particular vSwitch and may require specifying the vSwitch type, version
- and key features such as overlay tunnel termination support.
-
- tosca.capabilities.nfv.Storage:
- derived_from: tosca.capabilities.Root
- properties:
- storage_requirement:
- type: scalar-unit.size
- required: false
- constraints:
- - greater_or_equal: 0 MB
- description: >
- Required storage characteristics (e.g. size), including Key Quality
- Indicators (KQIs) for performance and reliability/availability.
- rdma_support_bandwitdh:
- type: integer
- required: false
- constraints:
- - greater_or_equal: 0
- description: >
- The VDU may have been developed, optimized or tested with a
- storage supporting RDMA over a given bandwidth.
-
-##########################################################################
-# Relationship Type.
-# A Relationship Type is a reusable entity that defines the type of one
-# or more relationships between Node Types or Node Templates.
-##########################################################################
-relationship_types:
- tosca.relationships.nfv.VirtualBindsTo:
- derived_from: tosca.relationships.ConnectsTo
- valid_target_types: [ tosca.capabilities.nfv.VirtualBindable ]
-
- tosca.relationships.nfv.HA:
- derived_from: tosca.relationships.Root
- valid_target_types: [ tosca.capabilities.nfv.HA ]
-
- tosca.relationships.nfv.Monitor:
- derived_from: tosca.relationships.ConnectsTo #???
- valid_target_types: [ tosca.capabilities.nfv.Metric ]
+ constraints:
+ - min_length: 1
+ description: >
+ The VDU may have been developed, optimized or
+ tested with an acceleration device such as a crypto
+ accelerator that may typically be accessed over a PCIe
+ bus.
+
+tosca.capabilities.nfv.network.Interfaces:
+ derived_from: tosca.capabilities.Root
+ properties:
+ network_interface_card_capability:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ constraints:
+ - min_length: 1
+ description: >
+ The VDU may have been developed, optimized or
+ tested with certain NIC capabilities to benefit items
+ such as performance or scalability. These include:
+ • TCP Large Segmentation Offload (LSO) for
+ offload the segmentation of large TCP
+ messages into MTU sized packets from the
+ CPU to the NIC.
+ • Large Receive Offload (LRO), i.e. the
+ inverse of LSO by coalescing incoming
+ TCP/IP packets into larger segments for
+ processing in the CPU.
+ • Checksum Offload.
+ • Receive Side Scaling (RSS), for packet
+ distribution between cores.
+ • Flow Director, for more fine grained (than
+ RSS) packet distribution between cores.
+ • Mirroring of packets between interfaces.
+ • Availability of Independent Rx/Tx queues for
+ VM so that queue pairs in the NIC can be
+ allocated to the VMs.
+ • Jumbo Frame support.
+ • VLAN tag stripping.
+ • RDMA support.
+ • SR-IOV support.
+ • Data processing acceleration software
+ library support, e.g. DPDK ® - see note.
+ network_interface_bandwidth:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ constraints:
+ - min_length: 1
+ description: >
+ The network speed/bandwidth to be guaranteed
+ per requested NIC.
+ data_processing_acceleration_library:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ constraints:
+ - min_length: 1
+ description: >
+ Name and version of the data processing
+ acceleration library used. Orchestration can match
+ any NIC that is known to be compatible with the
+ specified library
+
+tosca.capabilities.nfv.network.Virtual_switches:
+ derived_from: tosca.capabilities.Root
+ properties:
+ vswitch_capability:
+ type: list
+ required: false
+ entry_schema:
+ type: string
+ constraints:
+ - min_length: 1
+ description: >
+ The VDU may have been developed, optimized or tested with a
+ particular vSwitch and may require specifying the vSwitch type, version
+ and key features such as overlay tunnel termination support.
+
+tosca.capabilities.nfv.Storage:
+ derived_from: tosca.capabilities.Root
+ properties:
+ storage_requirement:
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 MB
+ description: >
+ Required storage characteristics (e.g. size), including Key Quality
+ Indicators (KQIs) for performance and reliability/availability.
+ rdma_support_bandwitdh:
+ type: integer
+ required: false
+ constraints:
+ - greater_or_equal: 0
+ description: >
+ The VDU may have been developed, optimized or tested with a
+ storage supporting RDMA over a given bandwidth.
- tosca.relationships.nfv.ForwardsTo:
- derived_from: tosca.relationships.root
- valid_target_types: [ tosca.capabilities.nfv.Forwarder ]
- tosca.relationships.nfv.VirtualLinksTo:
- derived_from: tosca.relationships.ConnectsTo
- valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ]
##########################################################################
- # groups Type.
- # as defined within the TOSCA nfv Simple Profile specification.
- # BWT:Not supported by tosca-parser currently, and will be added future.
+# Group Type.
+# Defined within the TOSCA nfv Simple Profile specification.
##########################################################################
-#group_types:
-# tosca.groups.nfv.VNFFG:
-# derived_from: tosca.groups.Root
-# properties:
-# vendor:
-# type: string
-# required: true
-# description: name of the vendor who generate this VNFFG
-# version:
-# type: string
-# required: true
-# description: version of this VNFFG
-# number_of_endpoints:
-# type: integer
-# required: true
-# description: count of the external endpoints included in this VNFFG
-# dependent_virtual_link:
-# type: list
-# description: Reference to a VLD used in this Forwarding Graph
-# required: true
-# entry_schema:
-# type: string
-# connection_point:
-# type: list
-# description: Reference to Connection Points forming the VNFFG
-# required: true
-# entry_schema:
-# type: string
-# constituent_vnfs:
-# type: list
-# description: Reference to a list of VNFD used in this VNF Forwarding Graph
-# required: true
-# entry_schema:
-# type: string
-# targets:
-# type: list
-# required: false
-# description: list of Network Forwarding Path within the VNFFG
-# entry_schema:
-# type: string
-# requirements:
-# - forwarder:
-# capability: tosca.capabilities.Forwarder
-
-#datatype_definitions:
+tosca.groups.nfv.VNFFG:
+ derived_from: tosca.groups.Root
+ properties:
+ vendor:
+ type: string
+ required: true
+ description: name of the vendor who generate this VNFFG
+ version:
+ type: string
+ required: true
+ description: version of this VNFFG
+ number_of_endpoints:
+ type: integer
+ required: true
+ description: count of the external endpoints included in this VNFFG
+ dependent_virtual_link:
+ type: list
+ description: Reference to a VLD used in this Forwarding Graph
+ required: true
+ entry_schema:
+ type: string
+ connection_point:
+ type: list
+ description: Reference to Connection Points forming the VNFFG
+ required: true
+ entry_schema:
+ type: string
+ constituent_vnfs:
+ type: list
+ description: Reference to a list of VNFD used in this VNF Forwarding Graph
+ required: true
+ entry_schema:
+ type: string
+ targets:
+ type: list
+ required: false
+ description: list of Network Forwarding Path within the VNFFG
+ entry_schema:
+ type: string
+ requirements:
+ - forwarder:
+ capability: tosca.capabilities.nfv.Forwarder
+ relationship: tosca.relationships.nfv.ForwardsTo
+
+#data_types:
##########################################################################
- # Data Type. To be continue
- # A Datatype is a complex data type declaration which contains other
- # complex or simple data types.
- # BWT: will be added future.
+# Data Type. To be continue
+# A Datatype is a complex data type declaration which contains other
+# complex or simple data types.
+# BWT: will be added future.
##########################################################################
-
#tosca.datatypes.network.XX:
# properties:
# network_name:
@@ -617,11 +617,11 @@ relationship_types:
#artifact_types:
##########################################################################
- # Artifact Type.To be continue
- # An Artifact Type is a reusable entity that defines the type of one or more
- # files which Node Types or Node Templates can have dependent relationships
- # and used during operations such as during installation or deployment.
- # BWT: will be added future.
+# Artifact Type.To be continue
+# An Artifact Type is a reusable entity that defines the type of one or more
+# files which Node Types or Node Templates can have dependent relationships
+# and used during operations such as during installation or deployment.
+# BWT: will be added future.
##########################################################################
#tosca.artifacts.File.XXX:
# derived_from: tosca.artifacts.Root
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml b/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
index f8d781c..c1c1cd4 100644
--- a/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/elements/TOSCA_definition_1_0.yaml
@@ -898,6 +898,16 @@ tosca.policies.Placement:
description: The TOSCA Policy Type definition that is used to govern
placement of TOSCA nodes or groups of nodes.
+tosca.policies.Placement.Colocate:
+ derived_from: tosca.policies.Placement
+ description: The TOSCA Policy Type definition that is used to govern
+ colocate placement of TOSCA nodes or groups of nodes.
+
+tosca.policies.Placement.Antilocate:
+ derived_from: tosca.policies.Placement
+ description: The TOSCA Policy Type definition that is used to govern
+ anti-locate placement of TOSCA nodes or groups of nodes.
+
tosca.policies.Scaling:
derived_from: tosca.policies.Root
description: The TOSCA Policy Type definition that is used to govern
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py b/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
index 8176def..148d2b6 100644
--- a/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
+++ b/tosca2heat/tosca-parser/toscaparser/elements/nodetype.py
@@ -12,7 +12,6 @@
from toscaparser.common.exception import ExceptionCollector
from toscaparser.common.exception import UnknownFieldError
-from toscaparser.common.exception import ValidationError
from toscaparser.elements.capabilitytype import CapabilityTypeDef
import toscaparser.elements.interfaces as ifaces
from toscaparser.elements.interfaces import InterfacesDef
@@ -160,24 +159,7 @@ class NodeType(StatefulEntityType):
return self.get_value(self.REQUIREMENTS, None, True)
def get_all_requirements(self):
- requires = self.requirements
- parent_node = self.parent_type
- if requires is None:
- requires = self.get_value(self.REQUIREMENTS, None, True)
- if parent_node is None:
- ExceptionCollector.appendException(
- ValidationError(message="parent_node is "
- + str(parent_node)))
- else:
- parent_node = parent_node.parent_type
- if parent_node:
- while parent_node.type != 'tosca.nodes.Root':
- req = parent_node.get_value(self.REQUIREMENTS, None, True)
- for r in req:
- if r not in requires:
- requires.append(r)
- parent_node = parent_node.parent_type
- return requires
+ return self.requirements
@property
def interfaces(self):
diff --git a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
index b82250e..660cdc0 100644
--- a/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
+++ b/tosca2heat/tosca-parser/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0.yaml
@@ -65,7 +65,7 @@ tosca.nodes.nfv.CP:
required: false
requirements:
- virtualLink:
- capability: tosca.capabilities.VirtualLinkable
+ capability: tosca.capabilities.nfv.VirtualLinkable
relationship: tosca.relationships.nfv.VirtualLinksTo
node: tosca.nodes.nfv.VL
- virtualBinding:
@@ -73,9 +73,8 @@ tosca.nodes.nfv.CP:
relationship: tosca.relationships.nfv.VirtualBindsTo
node: tosca.nodes.nfv.VDU
attributes:
- IP_address:
+ address:
type: string
- required: false
tosca.nodes.nfv.VL:
derived_from: tosca.nodes.network.Network