diff --git a/tacker/api/vnflcm/v1/controller.py b/tacker/api/vnflcm/v1/controller.py index 06391205d..5f5e692be 100644 --- a/tacker/api/vnflcm/v1/controller.py +++ b/tacker/api/vnflcm/v1/controller.py @@ -326,13 +326,15 @@ class VnfLcmController(wsgi.Controller): if operation_state in (fields.LcmOccsOperationState.FAILED, fields.LcmOccsOperationState.FAILED_TEMP): vnf_lcm_op_occs_id = vnf_lcm_op_occs.id - - notification['affectedVnfcs'] = affected_resources.get( - 'affectedVnfcs', []) - notification['affectedVirtualLinks'] = affected_resources.get( - 'affectedVirtualLinks', []) - notification['affectedVirtualStorages'] = affected_resources.get( - 'affectedVirtualStorages', []) + if affected_resources.get("affectedVnfcs"): + notification['affectedVnfcs'] = affected_resources.get( + 'affectedVnfcs') + if affected_resources.get("affectedVirtualLinks"): + notification['affectedVirtualLinks'] = affected_resources.get( + 'affectedVirtualLinks') + if affected_resources.get("affectedVirtualStorages"): + notification['affectedVirtualStorages'] = \ + affected_resources.get('affectedVirtualStorages') notification['error'] = str(vnf_lcm_op_occs.error) else: diff --git a/tacker/conductor/conductor_server.py b/tacker/conductor/conductor_server.py index 483b39e87..44d38469e 100644 --- a/tacker/conductor/conductor_server.py +++ b/tacker/conductor/conductor_server.py @@ -1724,12 +1724,15 @@ class Conductor(manager.Manager, v2_hook.ConductorV2Hook): vnf_lcm_op_occ.changed_ext_connectivity = ( changed_ext_connectivity) vnf_lcm_op_occ.save() - notification_data['affectedVnfcs'] = \ - affected_resources.get('affectedVnfcs', []) - notification_data['affectedVirtualLinks'] = \ - affected_resources.get('affectedVirtualLinks', []) - notification_data['affectedVirtualStorages'] = \ - affected_resources.get('affectedVirtualStorages', []) + if affected_resources.get('affectedVnfcs'): + notification_data['affectedVnfcs'] = \ + affected_resources.get('affectedVnfcs') + if affected_resources.get('affectedVirtualLinks'): + notification_data['affectedVirtualLinks'] = \ + affected_resources.get('affectedVirtualLinks') + if affected_resources.get('affectedVirtualStorages'): + notification_data['affectedVirtualStorages'] = \ + affected_resources.get('affectedVirtualStorages') notification_data['notificationStatus'] = \ fields.LcmOccsNotificationStatus.RESULT notification_data['changedExtConnectivity'] = \ diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/helloworld3.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/helloworld3.yaml new file mode 100644 index 000000000..8ed0ab406 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/helloworld3.yaml @@ -0,0 +1,110 @@ +heat_template_version: 2013-05-23 +description: 'Simple Base HOT for Sample VNF' + +parameters: + nfv: + type: json + +resources: + VDU1_scale: + type: OS::Heat::AutoScalingGroup + properties: + min_size: 1 + max_size: 3 + desired_capacity: 1 + resource: + type: VDU1.yaml + properties: + flavor: { get_param: [ nfv, VDU, VDU1, flavor ] } + image: { get_param: [ nfv, VDU, VDU1, image ] } + zone: { get_param: [ nfv, vdu, VDU1, zone ] } + net1: { get_param: [ nfv, CP, VDU1_CP1, network ] } + net2: { get_param: [ nfv, CP, VDU1_CP2, network ] } + net3: { get_resource: internalVL1 } + net4: { get_resource: internalVL2 } + net5: { get_resource: internalVL3 } + subnet: { get_param: [nfv, CP, VDU1_CP2, fixed_ips, 0, subnet]} + VDU1_scale_scale_out: + type: OS::Heat::ScalingPolicy + properties: + cooldown: 300 + scaling_adjustment: 1 + auto_scaling_group_id: + get_resource: VDU1_scale + adjustment_type: change_in_capacity + VDU1_scale_scale_in: + type: OS::Heat::ScalingPolicy + properties: + cooldown: 300 + scaling_adjustment: -1 + auto_scaling_group_id: + get_resource: VDU1_scale + adjustment_type: change_in_capacity + VDU2_scale: + type: OS::Heat::AutoScalingGroup + properties: + cooldown: 300 + min_size: 1 + max_size: 1 + desired_capacity: 1 + resource: + type: VDU2.yaml + properties: + flavor: { get_param: [ nfv, VDU, VDU2, flavor ] } + image: { get_param: [ nfv, VDU, VDU2, image ] } + zone: { get_param: [ nfv, vdu, VDU2, zone ] } + net1: { get_param: [ nfv, CP, VDU2_CP1, network ] } + net2: { get_param: [ nfv, CP, VDU2_CP2, network ] } + net3: { get_resource: internalVL1 } + net4: { get_resource: internalVL2 } + net5: { get_resource: internalVL3 } + ip1: { get_param: [nfv, CP, VDU2_CP2, fixed_ips, 0, ip_address]} + subnet: { get_param: [nfv, CP, VDU2_CP2, fixed_ips, 0, subnet]} + VDU2_scale_scale_out: + type: OS::Heat::ScalingPolicy + properties: + cooldown: 300 + scaling_adjustment: 1 + auto_scaling_group_id: + get_resource: VDU2_scale + adjustment_type: change_in_capacity + VDU2_scale_scale_in: + type: OS::Heat::ScalingPolicy + properties: + cooldown: 300 + scaling_adjustment: -1 + auto_scaling_group_id: + get_resource: VDU2_scale + adjustment_type: change_in_capacity + extmanageNW_1: + type: OS::Neutron::Net + extmanageNW_2: + type: OS::Neutron::Net + internalVL1: + type: OS::Neutron::Net + internalVL2: + type: OS::Neutron::Net + internalVL3: + type: OS::Neutron::Net + internalVL1_subnet: + type: OS::Neutron::Subnet + properties: + ip_version: 4 + network: + get_resource: internalVL1 + cidr: 192.168.3.0/24 + internalVL2_subnet: + type: OS::Neutron::Subnet + properties: + ip_version: 4 + network: + get_resource: internalVL2 + cidr: 192.168.4.0/24 + internalVL3_subnet: + type: OS::Neutron::Subnet + properties: + ip_version: 4 + network: + get_resource: internalVL3 + cidr: 192.168.5.0/24 +outputs: {} diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU1.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU1.yaml new file mode 100644 index 000000000..8f2448c78 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU1.yaml @@ -0,0 +1,64 @@ +heat_template_version: 2013-05-23 +description: 'VDU1 HOT for Sample VNF' + +parameters: + flavor: + type: string + image: + type: string + zone: + type: string + net1: + type: string + net2: + type: string + net3: + type: string + net4: + type: string + net5: + type: string + subnet: + type: string + +resources: + VDU1: + type: OS::Nova::Server + properties: + flavor: { get_param: flavor } + image: { get_param: image } + name: VDU1 + networks: + - port: + get_resource: VDU1_CP1 + - port: + get_resource: VDU1_CP2 + - port: + get_resource: VDU1_CP3 + - port: + get_resource: VDU1_CP4 + - port: + get_resource: VDU1_CP5 + availability_zone: { get_param: zone } + VDU1_CP1: + type: OS::Neutron::Port + properties: + network: { get_param: net1 } + VDU1_CP2: + type: OS::Neutron::Port + properties: + network: { get_param: net2 } + fixed_ips: + - subnet: { get_param: subnet} + VDU1_CP3: + type: OS::Neutron::Port + properties: + network: { get_param: net3 } + VDU1_CP4: + type: OS::Neutron::Port + properties: + network: { get_param: net4 } + VDU1_CP5: + type: OS::Neutron::Port + properties: + network: { get_param: net5 } diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU2.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU2.yaml new file mode 100644 index 000000000..9cd25bd38 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/BaseHOT/simple/nested/VDU2.yaml @@ -0,0 +1,68 @@ +heat_template_version: 2013-05-23 +description: 'VDU2 HOT for Sample VNF' + +parameters: + flavor: + type: string + image: + type: string + zone: + type: string + net1: + type: string + net2: + type: string + net3: + type: string + net4: + type: string + net5: + type: string + ip1: + type: string + subnet: + type: string + +resources: + VDU2: + type: OS::Nova::Server + properties: + flavor: { get_param: flavor } + name: VDU2 + image: { get_param: image } + networks: + - port: + get_resource: VDU2_CP1 + - port: + get_resource: VDU2_CP2 + - port: + get_resource: VDU2_CP3 + - port: + get_resource: VDU2_CP4 + - port: + get_resource: VDU2_CP5 + availability_zone: { get_param: zone } + + VDU2_CP1: + type: OS::Neutron::Port + properties: + network: { get_param: net1 } + VDU2_CP2: + type: OS::Neutron::Port + properties: + network: { get_param: net2 } + fixed_ips: + - ip_address: { get_param: ip1} + subnet: { get_param: subnet} + VDU2_CP3: + type: OS::Neutron::Port + properties: + network: { get_param: net3 } + VDU2_CP4: + type: OS::Neutron::Port + properties: + network: { get_param: net4 } + VDU2_CP5: + type: OS::Neutron::Port + properties: + network: { get_param: net5 } diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_common_types.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_common_types.yaml new file mode 100644 index 000000000..b341ca9a6 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_common_types.yaml @@ -0,0 +1,259 @@ +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 +data_types: + 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: + constraints: + - valid_values: + - mac_address + - ip_address + 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 + type: string + l2_address_data: + description: Provides the information on the MAC addresses to be assigned + to a connection point. + required: false + type: tosca.datatypes.nfv.L2AddressData + l3_address_data: + description: Provides the information on the IP addresses to be assigned to + a connection point + required: false + type: tosca.datatypes.nfv.L3AddressData + tosca.datatypes.nfv.ConnectivityType: + derived_from: tosca.datatypes.Root + description: describes additional connectivity information of a virtualLink + properties: + flow_pattern: + constraints: + - valid_values: + - line + - tree + - mesh + description: Identifies the flow pattern of the connectivity + required: false + type: string + layer_protocols: + 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. + entry_schema: + constraints: + - valid_values: + - ethernet + - mpls + - odu2 + - ipv4 + - ipv6 + - pseudo-wire + type: string + required: true + type: list + 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: + address_data: + description: Provides information on the addresses to be assigned to the CP + entry_schema: + type: tosca.datatypes.nfv.AddressData + required: false + type: list + associated_layer_protocol: + constraints: + - valid_values: + - ethernet + - mpls + - odu2 + - ipv4 + - ipv6 + - pseudo-wire + description: One of the values of the property layer_protocols of the CP + required: true + type: string + 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: + 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 + type: boolean + 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: + floating_ip_activated: + description: Specifies if the floating IP scheme is activated on the Connection + Point or not + required: true + type: boolean + ip_address_assignment: + 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 + type: boolean + ip_address_type: + constraints: + - valid_values: + - ipv4 + - ipv6 + 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 + type: string + number_of_ip_address: + constraints: + - greater_than: 0 + description: Minimum number of IP addresses to be assigned + required: false + type: integer + tosca.datatypes.nfv.LinkBitrateRequirements: + derived_from: tosca.datatypes.Root + description: describes the requirements in terms of bitrate for a virtual link + properties: + leaf: + constraints: + - greater_or_equal: 0 + 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 + type: integer + root: + constraints: + - greater_or_equal: 0 + 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 + type: integer + 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: + constraints: + - greater_than: 0 s + description: Specifies the maximum latency + required: true + type: scalar-unit.time + packet_delay_variation: + constraints: + - greater_or_equal: 0 s + description: Specifies the maximum jitter + required: true + type: scalar-unit.time + packet_loss_ratio: + constraints: + - in_range: + - 0.0 + - 1.0 + description: Specifies the maximum packet loss ratio + required: false + type: float + 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: + 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 + type: string + max_number_of_instances: + constraints: + - greater_or_equal: 0 + description: Maximum number of instances of the VNF based on this VNFD that + is permitted to exist for this VnfProfile. + required: true + type: integer + min_number_of_instances: + constraints: + - greater_or_equal: 0 + description: Minimum number of instances of the VNF based on this VNFD that + is permitted to exist for this VnfProfile. + required: true + type: integer +description: ETSI NFV SOL 001 common types definitions version 2.6.1 +metadata: + template_author: ETSI_NFV + template_name: etsi_nfv_sol001_common_types + template_version: 2.6.1 +node_types: + tosca.nodes.nfv.Cp: + derived_from: tosca.nodes.Root + description: Provides information regarding the purpose of the connection point + properties: + description: + description: Provides human-readable information on the purpose of the connection + point + required: false + type: string + layer_protocols: + description: Identifies which protocol the connection point uses for connectivity + purposes + entry_schema: + constraints: + - valid_values: + - ethernet + - mpls + - odu2 + - ipv4 + - ipv6 + - pseudo-wire + type: string + required: true + type: list + protocol: + description: Provides information on the addresses to be assigned to the connection + point(s) instantiated from this Connection Point Descriptor + entry_schema: + type: tosca.datatypes.nfv.CpProtocolData + required: false + type: list + role: + constraints: + - valid_values: + - root + - leaf + description: Identifies the role of the port in the context of the traffic + flow patterns in the VNF or parent NS + required: false + type: string + trunk_mode: + 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 + type: boolean +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 +tosca_definitions_version: tosca_simple_yaml_1_2 diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_vnfd_types.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_vnfd_types.yaml new file mode 100644 index 000000000..05df17e69 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/etsi_nfv_sol001_vnfd_types.yaml @@ -0,0 +1,1719 @@ +artifact_types: + tosca.artifacts.Implementation.nfv.Mistral: + derived_from: tosca.artifacts.Implementation + description: artifacts for Mistral workflows + file_ext: + - yaml + mime_type: application/x-yaml + tosca.artifacts.nfv.SwImage: + derived_from: tosca.artifacts.Deployment.Image + description: describes the software image which is directly loaded on the virtualisation + container realizing of the VDU or is to be loaded on a virtual storage resource. +capability_types: + tosca.capabilities.nfv.VirtualBindable: + derived_from: tosca.capabilities.Node + description: Indicates that the node that includes it can be pointed by a tosca.relationships.nfv.VirtualBindsTo + relationship type which is used to model the VduHasCpd association + tosca.capabilities.nfv.VirtualCompute: + derived_from: tosca.capabilities.Node + description: Describes the capabilities related to virtual compute resources + properties: + compute_requirements: + entry_schema: + type: string + required: false + type: map + logical_node: + description: Describes the Logical Node requirements + entry_schema: + type: tosca.datatypes.nfv.LogicalNodeData + required: false + type: map + requested_additional_capabilities: + description: Describes additional capability for a particular VDU + entry_schema: + type: tosca.datatypes.nfv.RequestedAdditionalCapability + required: false + type: map + virtual_cpu: + description: Describes virtual CPU(s) of the virtualized compute + required: true + type: tosca.datatypes.nfv.VirtualCpu + virtual_local_storage: + description: A list of virtual system disks created and destroyed as part + of the VM lifecycle + entry_schema: + description: virtual system disk definition + type: tosca.datatypes.nfv.VirtualBlockStorageData + required: false + type: list + virtual_memory: + description: Describes virtual memory of the virtualized compute + required: true + type: tosca.datatypes.nfv.VirtualMemory + tosca.capabilities.nfv.VirtualStorage: + derived_from: tosca.capabilities.Root + description: Describes the attachment capabilities related to Vdu.Storage +data_types: + tosca.datatypes.nfv.ChecksumData: + derived_from: tosca.datatypes.Root + description: Describes information about the result of performing a checksum operation + over some arbitrary data + properties: + algorithm: + constraints: + - valid_values: + - sha-224 + - sha-256 + - sha-384 + - sha-512 + description: Describes the algorithm used to obtain the checksum value + required: true + type: string + hash: + description: Contains the result of applying the algorithm indicated by the + algorithm property to the data to which this ChecksumData refers + required: true + type: string + tosca.datatypes.nfv.InstantiationLevel: + derived_from: tosca.datatypes.Root + description: Describes the scale level for each aspect that corresponds to a given + level of resources to be instantiated within a deployment flavour in term of + the number VNFC instances + properties: + description: + description: Human readable description of the level + required: true + type: string + scale_info: + description: Represents for each aspect the scale level that corresponds to + this instantiation level. scale_info shall be present if the VNF supports + scaling. + entry_schema: + type: tosca.datatypes.nfv.ScaleInfo + required: false + type: map + tosca.datatypes.nfv.InterfaceDetails: + derived_from: tosca.datatypes.Root + description: information used to access an interface exposed by a VNF + properties: + interface_specific_data: + description: Provides additional details that are specific to the type of + interface considered. + entry_schema: + type: string + required: false + type: map + uri_components: + description: Provides components to build a Uniform Ressource Identifier (URI) + where to access the interface end point. + required: false + type: tosca.datatypes.nfv.UriComponents + tosca.datatypes.nfv.IpAllocationPool: + derived_from: tosca.datatypes.Root + description: Specifies a range of IP addresses + properties: + end_ip_address: + description: The IP address to be used as the last one in a pool of addresses + derived from the cidr block full IP range + required: true + type: string + start_ip_address: + description: The IP address to be used as the first one in a pool of addresses + derived from the cidr block full IP range + required: true + type: string + tosca.datatypes.nfv.L2ProtocolData: + derived_from: tosca.datatypes.Root + description: describes L2 protocol data for a given virtual link used in a specific + VNF deployment flavour. + properties: + mtu: + constraints: + - greater_than: 0 + description: Specifies the maximum transmission unit (MTU) value for this + L2 protocol. + required: false + type: integer + name: + description: Identifies the network name associated with this L2 protocol. + required: false + type: string + network_type: + constraints: + - valid_values: + - flat + - vlan + - vxlan + - gre + description: Specifies the network type for this L2 protocol.The value may + be overridden at run-time. + required: false + type: string + vlan_transparent: + default: false + description: Specifies whether to support VLAN transparency for this L2 protocol + or not. + required: false + type: boolean + tosca.datatypes.nfv.L3ProtocolData: + derived_from: tosca.datatypes.Root + description: describes L3 protocol data for a given virtual link used in a specific + VNF deployment flavour. + properties: + cidr: + description: Specifies the CIDR (Classless Inter-Domain Routing) of this L3 + protocol. The value may be overridden at run-time. + required: true + type: string + dhcp_enabled: + description: Indicates whether DHCP (Dynamic Host Configuration Protocol) + is enabled or disabled for this L3 protocol. The value may be overridden + at run-time. + required: false + type: boolean + gateway_ip: + description: Specifies the gateway IP address for this L3 protocol. The value + may be overridden at run-time. + required: false + type: string + ip_allocation_pools: + description: Specifies the allocation pools with start and end IP addresses + for this L3 protocol. The value may be overridden at run-time. + entry_schema: + type: tosca.datatypes.nfv.IpAllocationPool + required: false + type: list + ip_version: + constraints: + - valid_values: + - ipv4 + - ipv6 + description: Specifies IP version of this L3 protocol.The value of the ip_version + property shall be consistent with the value of the layer_protocol in the + connectivity_type property of the virtual link node. + required: true + type: string + ipv6_address_mode: + constraints: + - valid_values: + - slaac + - dhcpv6-stateful + - dhcpv6-stateless + description: Specifies IPv6 address mode. May be present when the value of + the ipVersion attribute is "ipv6" and shall be absent otherwise. The value + may be overridden at run-time. + required: false + type: string + name: + description: Identifies the network name associated with this L3 protocol. + required: false + type: string + tosca.datatypes.nfv.LogicalNodeData: + derived_from: tosca.datatypes.Root + description: Describes compute, memory and I/O requirements associated with a + particular VDU. + properties: + logical_node_requirements: + description: The logical node-level compute, memory and I/O requirements. + A map of strings that contains a set of key-value pairs that describes + hardware platform specific deployment requirements, including the number + of CPU cores on this logical node, a memory configuration specific to a + logical node or a requirement related to the association of an I/O device + with the logical node. + entry_schema: + type: string + required: false + type: map + tosca.datatypes.nfv.RequestedAdditionalCapability: + derived_from: tosca.datatypes.Root + description: describes requested additional capability for a particular VDU + properties: + min_requested_additional_capability_version: + description: Identifies the minimum version of the requested additional capability. + required: false + type: string + preferred_requested_additional_capability_version: + description: Identifies the preferred version of the requested additional + capability. + required: false + type: string + requested_additional_capability_name: + description: Identifies a requested additional capability for the VDU. + required: true + type: string + support_mandatory: + description: Indicates whether the requested additional capability is mandatory + for successful operation. + required: true + type: boolean + target_performance_parameters: + description: Identifies specific attributes, dependent on the requested additional + capability type. + entry_schema: + type: string + required: true + type: map + tosca.datatypes.nfv.ScaleInfo: + derived_from: tosca.datatypes.Root + description: Indicates for a given scaleAspect the corresponding scaleLevel + properties: + scale_level: + constraints: + - greater_or_equal: 0 + description: The scale level for a particular aspect + required: true + type: integer + tosca.datatypes.nfv.ScalingAspect: + derived_from: tosca.datatypes.Root + properties: + description: + required: true + type: string + max_scale_level: + constraints: + - greater_or_equal: 0 + required: true + type: integer + name: + required: true + type: string + step_deltas: + entry_schema: + type: string + required: false + type: list + tosca.datatypes.nfv.SwImageData: + derived_from: tosca.datatypes.Root + description: describes information related to a software image artifact + properties: + checksum: + description: Checksum of the software image file + required: true + type: tosca.datatypes.nfv.ChecksumData + container_format: + constraints: + - valid_values: + - aki + - ami + - ari + - bare + - docker + - ova + - ovf + description: The container format describes the container file format in which + software image is provided + required: true + type: string + disk_format: + constraints: + - valid_values: + - aki + - ami + - ari + - iso + - qcow2 + - raw + - vdi + - vhd + - vhdx + - vmdk + description: The disk format of a software image is the format of the underlying + disk image + required: true + type: string + min_disk: + constraints: + - greater_or_equal: 0 B + description: The minimal disk size requirement for this software image + required: true + type: scalar-unit.size + min_ram: + constraints: + - greater_or_equal: 0 B + description: The minimal RAM requirement for this software image + required: false + type: scalar-unit.size + name: + description: Name of this software image + required: true + type: string + operating_system: + description: Identifies the operating system used in the software image + required: false + type: string + size: + description: The size of this software image + required: true + type: scalar-unit.size + supported_virtualisation_environments: + description: Identifies the virtualisation environments (e.g. hypervisor) + compatible with this software image + entry_schema: + type: string + required: false + type: list + version: + description: Version of this software image + required: true + type: string + tosca.datatypes.nfv.UriAuthority: + derived_from: tosca.datatypes.Root + description: information that corresponds to the authority component of a URI + as specified in IETF RFC 3986 [8] + properties: + host: + description: host field of the authority component of a URI + required: false + type: string + port: + description: port field of the authority component of a URI + required: false + type: string + user_info: + description: user_info field of the authority component of a URI + required: false + type: string + tosca.datatypes.nfv.UriComponents: + derived_from: tosca.datatypes.Root + description: information used to build a URI that complies with IETF RFC 3986 + [8]. + properties: + authority: + description: Authority component of a URI + required: false + type: tosca.datatypes.nfv.UriAuthority + fragment: + description: fragment component of a URI. + required: false + type: string + path: + description: path component of a URI. + required: false + type: string + query: + description: query component of a URI. + required: false + type: string + scheme: + description: scheme component of a URI. + required: true + type: string + tosca.datatypes.nfv.VduLevel: + derived_from: tosca.datatypes.Root + description: Indicates for a given Vdu.Compute in a given level the number of + instances to deploy + properties: + number_of_instances: + constraints: + - greater_or_equal: 0 + description: Number of instances of VNFC based on this VDU to deploy for this + level. + required: true + type: integer + tosca.datatypes.nfv.VduProfile: + derived_from: tosca.datatypes.Root + description: describes additional instantiation data for a given Vdu.Compute used + in a specific deployment flavour. + properties: + max_number_of_instances: + constraints: + - greater_or_equal: 0 + description: Maximum number of instances of the VNFC based on this Vdu.Compute + that is permitted to exist for a particular VNF deployment flavour. + required: true + type: integer + min_number_of_instances: + constraints: + - greater_or_equal: 0 + description: Minimum number of instances of the VNFC based on this Vdu.Compute + that is permitted to exist for a particular VNF deployment flavour. + required: true + type: integer + tosca.datatypes.nfv.VirtualBlockStorageData: + derived_from: tosca.datatypes.Root + description: VirtualBlockStorageData describes block storage requirements associated + with compute resources in a particular VDU, either as a local disk or as virtual + attached storage + properties: + rdma_enabled: + default: false + description: Indicates if the storage support RDMA + required: false + type: boolean + size_of_storage: + constraints: + - greater_or_equal: 0 B + description: Size of virtualised storage resource + required: true + type: scalar-unit.size + vdu_storage_requirements: + description: The hardware platform specific storage requirements. A map of + strings that contains a set of key-value pairs that represents the hardware + platform specific storage deployment requirements. + entry_schema: + type: string + required: false + type: map + tosca.datatypes.nfv.VirtualCpu: + derived_from: tosca.datatypes.Root + description: Supports the specification of requirements related to virtual CPU(s) + of a virtual compute resource + properties: + cpu_architecture: + description: CPU architecture type. Examples are x86, ARM + required: false + type: string + num_virtual_cpu: + constraints: + - greater_than: 0 + description: Number of virtual CPUs + required: true + type: integer + vdu_cpu_requirements: + description: The hardware platform specific VDU CPU requirements. A map of + strings that contains a set of key-value pairs describing VDU CPU specific + hardware platform requirements. + entry_schema: + type: string + required: false + type: map + virtual_cpu_clock: + description: Minimum virtual CPU clock rate + required: false + type: scalar-unit.frequency + virtual_cpu_oversubscription_policy: + description: CPU core oversubscription policy e.g. the relation of virtual + CPU cores to physical CPU cores/threads. + required: false + type: string + virtual_cpu_pinning: + description: The virtual CPU pinning configuration for the virtualised compute + resource. + required: false + type: tosca.datatypes.nfv.VirtualCpuPinning + tosca.datatypes.nfv.VirtualCpuPinning: + derived_from: tosca.datatypes.Root + description: Supports the specification of requirements related to the virtual + CPU pinning configuration of a virtual compute resource + properties: + virtual_cpu_pinning_policy: + constraints: + - valid_values: + - static + - dynamic + description: 'Indicates the policy for CPU pinning. The policy can take values + of "static" or "dynamic". In case of "dynamic" the allocation of virtual + CPU cores to logical CPU cores is decided by the VIM. (e.g.: SMT (Simultaneous + Multi-Threading) requirements). In case of "static" the allocation is requested + to be according to the virtual_cpu_pinning_rule.' + required: false + type: string + virtual_cpu_pinning_rule: + description: Provides the list of rules for allocating virtual CPU cores to + logical CPU cores/threads + entry_schema: + type: string + required: false + type: list + tosca.datatypes.nfv.VirtualFileStorageData: + derived_from: tosca.datatypes.Root + description: VirtualFileStorageData describes file storage requirements associated + with compute resources in a particular VDU + properties: + file_system_protocol: + description: The shared file system protocol (e.g. NFS, CIFS) + required: true + type: string + size_of_storage: + constraints: + - greater_or_equal: 0 B + description: Size of virtualized storage resource + required: true + type: scalar-unit.size + tosca.datatypes.nfv.VirtualLinkBitrateLevel: + derived_from: tosca.datatypes.Root + description: Describes bitrate requirements applicable to the virtual link instantiated + from a particicular VnfVirtualLink + properties: + bitrate_requirements: + description: Virtual link bitrate requirements for an instantiation level + or bitrate delta for a scaling step + required: true + type: tosca.datatypes.nfv.LinkBitrateRequirements + tosca.datatypes.nfv.VirtualLinkMonitoringParameter: + derived_from: tosca.datatypes.Root + description: Represents information on virtualised resource related performance + metrics applicable to the VNF. + properties: + collection_period: + constraints: + - greater_than: 0 s + description: Describes the periodicity at which to collect the performance + information. + required: false + type: scalar-unit.time + name: + description: Human readable name of the monitoring parameter + required: true + type: string + performance_metric: + constraints: + - valid_values: + - packet_outgoing_virtual_link + - packet_incoming_virtual_link + description: Identifies a performance metric derived from those defined in + ETSI GS NFV-IFA 027.The packetOutgoingVirtualLink and packetIncomingVirtualLink + metrics shall be obtained by aggregation the PacketOutgoing and PacketIncoming + measurements defined in clause 7.1 of GS NFV-IFA 027 of all virtual link + ports attached to the virtual link to which the metrics apply. + required: true + type: string + tosca.datatypes.nfv.VirtualLinkProtocolData: + derived_from: tosca.datatypes.Root + description: describes one protocol layer and associated protocol data for a given + virtual link used in a specific VNF deployment flavour + properties: + associated_layer_protocol: + constraints: + - valid_values: + - ethernet + - mpls + - odu2 + - ipv4 + - ipv6 + - pseudo-wire + description: Identifies one of the protocols a virtualLink gives access to + (ethernet, mpls, odu2, ipv4, ipv6, pseudo-wire) as specified by the connectivity_type + property. + required: true + type: string + l2_protocol_data: + description: Specifies the L2 protocol data for a virtual link. Shall be present + when the associatedLayerProtocol attribute indicates a L2 protocol and shall + be absent otherwise. + required: false + type: tosca.datatypes.nfv.L2ProtocolData + l3_protocol_data: + description: Specifies the L3 protocol data for this virtual link. Shall + be present when the associatedLayerProtocol attribute indicates a L3 protocol + and shall be absent otherwise. + required: false + type: tosca.datatypes.nfv.L3ProtocolData + tosca.datatypes.nfv.VirtualMemory: + derived_from: tosca.datatypes.Root + description: supports the specification of requirements related to virtual memory + of a virtual compute resource + properties: + numa_enabled: + default: false + description: It specifies the memory allocation to be cognisant of the relevant + process/core allocation. + required: false + type: boolean + vdu_mem_requirements: + description: The hardware platform specific VDU memory requirements. A map + of strings that contains a set of key-value pairs that describes hardware + platform specific VDU memory requirements. + entry_schema: + type: string + required: false + type: map + virtual_mem_oversubscription_policy: + description: The memory core oversubscription policy in terms of virtual memory + to physical memory on the platform. + required: false + type: string + virtual_mem_size: + description: Amount of virtual memory. + required: true + type: scalar-unit.size + tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements: + derived_from: tosca.datatypes.Root + description: Describes requirements on a virtual network interface + properties: + description: + description: Provides a human readable description of the requirement. + required: false + type: string + name: + description: Provides a human readable name for the requirement. + required: false + type: string + network_interface_requirements: + description: The network interface requirements. A map of strings that contain + a set of key-value pairs that describes the hardware platform specific network + interface deployment requirements. + entry_schema: + type: string + required: true + type: map + nic_io_requirements: + description: references (couples) the CP with any logical node I/O requirements + (for network devices) that may have been created. Linking these attributes + is necessary so that so that I/O requirements that need to be articulated + at the logical node level can be associated with the network interface requirements + associated with the CP. + required: false + type: tosca.datatypes.nfv.LogicalNodeData + support_mandatory: + description: Indicates whether fulfilling the constraint is mandatory (TRUE) + for successful operation or desirable (FALSE). + required: true + type: boolean + tosca.datatypes.nfv.VirtualObjectStorageData: + derived_from: tosca.datatypes.Root + description: VirtualObjectStorageData describes object storage requirements associated + with compute resources in a particular VDU + properties: + max_size_of_storage: + constraints: + - greater_or_equal: 0 B + description: Maximum size of virtualized storage resource + required: false + type: scalar-unit.size + tosca.datatypes.nfv.VlProfile: + derived_from: tosca.datatypes.Root + description: Describes additional instantiation data for a given VL used in a + specific VNF deployment flavour. + properties: + max_bitrate_requirements: + description: Specifies the maximum bitrate requirements for a VL instantiated + according to this profile. + required: true + type: tosca.datatypes.nfv.LinkBitrateRequirements + min_bitrate_requirements: + description: Specifies the minimum bitrate requirements for a VL instantiated + according to this profile. + required: true + type: tosca.datatypes.nfv.LinkBitrateRequirements + qos: + description: Specifies the QoS requirements of a VL instantiated according + to this profile. + required: false + type: tosca.datatypes.nfv.Qos + virtual_link_protocol_data: + description: Specifies the protocol data for a virtual link. + entry_schema: + type: tosca.datatypes.nfv.VirtualLinkProtocolData + required: false + type: list + tosca.datatypes.nfv.VnfAdditionalConfigurableProperties: + derived_from: tosca.datatypes.Root + description: is an empty base type for deriving data types for describing additional + configurable properties for a given VNF + tosca.datatypes.nfv.VnfChangeExtConnectivityOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the ChangeExtVnfConnectivity + operation + tosca.datatypes.nfv.VnfChangeFlavourOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the ChangeVnfFlavour + operation + tosca.datatypes.nfv.VnfConfigurableProperties: + derived_from: tosca.datatypes.Root + description: indicates configuration properties for a given VNF (e.g. related + to auto scaling and auto healing). + properties: + is_autoheal_enabled: + description: It permits to enable (TRUE)/disable (FALSE) the auto-healing + functionality. If the properties is not present for configuring, then VNF + property is not supported + required: false + type: boolean + is_autoscale_enabled: + description: It permits to enable (TRUE)/disable (FALSE) the auto-scaling + functionality. If the properties is not present for configuring, then VNF + property is not supported + required: false + type: boolean + tosca.datatypes.nfv.VnfHealOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the HealVnf + operation + properties: + causes: + description: Supported "cause" parameter values + entry_schema: + type: string + required: false + type: list + tosca.datatypes.nfv.VnfInfoModifiableAttributes: + derived_from: tosca.datatypes.Root + description: Describes VNF-specific extension and metadata for a given VNF + tosca.datatypes.nfv.VnfInfoModifiableAttributesExtensions: + derived_from: tosca.datatypes.Root + description: is an empty base type for deriving data types for describing VNF-specific + extension + tosca.datatypes.nfv.VnfInfoModifiableAttributesMetadata: + derived_from: tosca.datatypes.Root + description: is an empty base type for deriving data types for describing VNF-specific + metadata + tosca.datatypes.nfv.VnfInstantiateOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the InstantiateVnf + operation. + tosca.datatypes.nfv.VnfLcmOperationsConfiguration: + derived_from: tosca.datatypes.Root + description: Represents information to configure lifecycle management operations + properties: + change_ext_connectivity: + description: Configuration parameters for the changeExtVnfConnectivityOpConfig + operation + required: false + type: tosca.datatypes.nfv.VnfChangeExtConnectivityOperationConfiguration + change_flavour: + description: Configuration parameters for the changeVnfFlavourOpConfig operation + required: false + type: tosca.datatypes.nfv.VnfChangeFlavourOperationConfiguration + heal: + description: Configuration parameters for the HealVnf operation + required: false + type: tosca.datatypes.nfv.VnfHealOperationConfiguration + instantiate: + description: Configuration parameters for the InstantiateVnf operation + required: false + type: tosca.datatypes.nfv.VnfInstantiateOperationConfiguration + operate: + description: Configuration parameters for the OperateVnf operation + required: false + type: tosca.datatypes.nfv.VnfOperateOperationConfiguration + scale: + description: Configuration parameters for the ScaleVnf operation + required: false + type: tosca.datatypes.nfv.VnfScaleOperationConfiguration + scale_to_level: + description: Configuration parameters for the ScaleVnfToLevel operation + required: false + type: tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration + terminate: + description: Configuration parameters for the TerminateVnf operation + required: false + type: tosca.datatypes.nfv.VnfTerminateOperationConfiguration + tosca.datatypes.nfv.VnfMonitoringParameter: + derived_from: tosca.datatypes.Root + description: Represents information on virtualised resource related performance + metrics applicable to the VNF. + properties: + collection_period: + constraints: + - greater_than: 0 s + description: Describes the periodicity at which to collect the performance + information. + required: false + type: scalar-unit.time + name: + description: Human readable name of the monitoring parameter + required: true + type: string + performance_metric: + constraints: + - valid_values: + - v_cpu_usage_mean_vnf + - v_cpu_usage_peak_vnf + - v_memory_usage_mean_vnf + - v_memory_usage_peak_vnf + - v_disk_usage_mean_vnf + - v_disk_usage_peak_vnf + - byte_incoming_vnf_ext_cp + - byte_outgoing_vnf_ext_cp + - packet_incoming_vnf_ext_cp + - packet_outgoing_vnf_ext_cp + description: Identifies the performance metric, according to ETSI GS NFV-IFA + 027. + required: true + type: string + tosca.datatypes.nfv.VnfOperateOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the OperateVnf + operation + properties: + max_recommended_graceful_stop_timeout: + description: Maximum recommended timeout value that can be needed to gracefully + stop a VNF instance of a particular type under certain conditions, such + as maximum load condition. This is provided by VNF provider as information + for the operator facilitating the selection of optimal timeout value. This + value is not used as constraint + required: false + type: scalar-unit.time + min_graceful_stop_timeout: + description: Minimum timeout value for graceful stop of a VNF instance + required: true + type: scalar-unit.time + tosca.datatypes.nfv.VnfOperationAdditionalParameters: + derived_from: tosca.datatypes.Root + description: Is an empty base type for deriving data type for describing VNF-specific + parameters to be passed when invoking lifecycle management operations + tosca.datatypes.nfv.VnfScaleOperationConfiguration: + derived_from: tosca.datatypes.Root + description: Represents information that affect the invocation of the ScaleVnf + operation + properties: + scaling_by_more_than_one_step_supported: + default: false + description: Signals whether passing a value larger than one in the numScalingSteps + parameter of the ScaleVnf operation is supported by this VNF. + required: false + type: boolean + tosca.datatypes.nfv.VnfScaleToLevelOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the ScaleVnfToLevel + operation + properties: + arbitrary_target_levels_supported: + description: Signals whether scaling according to the parameter "scaleInfo" + is supported by this VNF + required: true + type: boolean + tosca.datatypes.nfv.VnfTerminateOperationConfiguration: + derived_from: tosca.datatypes.Root + description: represents information that affect the invocation of the TerminateVnf + properties: + max_recommended_graceful_termination_timeout: + description: Maximum recommended timeout value that can be needed to gracefully + terminate a VNF instance of a particular type under certain conditions, + such as maximum load condition. This is provided by VNF provider as information + for the operator facilitating the selection of optimal timeout value. This + value is not used as constraint + required: false + type: scalar-unit.time + min_graceful_termination_timeout: + description: Minimum timeout value for graceful termination of a VNF instance + required: true + type: scalar-unit.time + tosca.datatypes.nfv.VnfcAdditionalConfigurableProperties: + derived_from: tosca.datatypes.Root + description: VnfcAdditionalConfigurableProperties type is an empty base type for + deriving data types for describing additional configurable properties for a + given VNFC. + tosca.datatypes.nfv.VnfcConfigurableProperties: + derived_from: tosca.datatypes.Root + description: Defines the configurable properties of a VNFC + tosca.datatypes.nfv.VnfcMonitoringParameter: + derived_from: tosca.datatypes.Root + description: Represents information on virtualised resource related performance + metrics applicable to the VNF. + properties: + collection_period: + constraints: + - greater_than: 0 s + description: Describes the periodicity at which to collect the performance + information. + required: false + type: scalar-unit.time + name: + description: Human readable name of the monitoring parameter + required: true + type: string + performance_metric: + constraints: + - valid_values: + - v_cpu_usage_mean_vnf + - v_cpu_usage_peak_vnf + - v_memory_usage_mean_vnf + - v_memory_usage_peak_vnf + - v_disk_usage_mean_vnf + - v_disk_usage_peak_vnf + - byte_incoming_vnf_int_cp + - byte_outgoing_vnf_int_cp + - packet_incoming_vnf_int_cp + - packet_outgoing_vnf_int_cp + description: Identifies the performance metric, according to ETSI GS NFV-IFA + 027. + required: true + type: string +description: ETSI NFV SOL 001 vnfd types definitions version 2.6.1 +group_types: + tosca.groups.nfv.PlacementGroup: + derived_from: tosca.groups.Root + description: PlacementGroup is used for describing the affinity or anti-affinity + relationship applicable between the virtualization containers to be created + based on different VDUs, or between internal VLs to be created based on different + VnfVirtualLinkDesc(s) + members: + - tosca.nodes.nfv.Vdu.Compute + - tosca.nodes.nfv.VnfVirtualLink + properties: + description: + description: Human readable description of the group + required: true + type: string +imports: +- ./etsi_nfv_sol001_common_types.yaml +interface_types: + tosca.interfaces.nfv.Vnflcm: + change_external_connectivity: + description: Invoked upon receipt of a Change External VNF Connectivity request + change_external_connectivity_end: + description: Invoked after change_external_connectivity + change_external_connectivity_start: + description: Invoked before change_external_connectivity + change_flavour: + description: Invoked upon receipt of a Change VNF Flavour request + change_flavour_end: + description: Invoked after change_flavour + change_flavour_start: + description: Invoked before change_flavour + derived_from: tosca.interfaces.Root + description: This interface encompasses a set of TOSCA operations corresponding + to the VNF LCM operations defined in ETSI GS NFV-IFA 007 as well as to preamble + and postamble procedures to the execution of the VNF LCM operations. + heal: + description: Invoked upon receipt of a Heal VNF request + heal_end: + description: Invoked after heal + heal_start: + description: Invoked before heal + instantiate: + description: Invoked upon receipt of an Instantiate VNF request + instantiate_end: + description: Invoked after instantiate + instantiate_start: + description: Invoked before instantiate + modify_information: + description: Invoked upon receipt of a Modify VNF Information request + modify_information_end: + description: Invoked after modify_information + modify_information_start: + description: Invoked before modify_information + operate: + description: Invoked upon receipt of an Operate VNF request + operate_end: + description: Invoked after operate + operate_start: + description: Invoked before operate + scale: + description: Invoked upon receipt of a Scale VNF request + scale_end: + description: Invoked after scale + scale_start: + description: Invoked before scale + scale_to_level: + description: Invoked upon receipt of a Scale VNF to Level request + scale_to_level_end: + description: Invoked after scale_to_level + scale_to_level_start: + description: Invoked before scale_to_level + terminate: + description: Invoked upon receipt Terminate VNF request + terminate_end: + description: Invoked after terminate + terminate_start: + description: Invoked before terminate +metadata: + template_author: ETSI_NFV + template_name: etsi_nfv_sol001_vnfd_types + template_version: 2.6.1 +node_types: + tosca.nodes.nfv.VNF: + derived_from: tosca.nodes.Root + description: The generic abstract type from which all VNF specific abstract node + types shall be derived to form, together with other node types, the TOSCA service + template(s) representing the VNFD + interfaces: + Vnflcm: + type: tosca.interfaces.nfv.Vnflcm + properties: + default_localization_language: + description: Default localization language that is instantiated if no information + about selected localization language is available + required: false + type: string + descriptor_id: + description: Globally unique identifier of the VNFD + required: true + type: string + descriptor_version: + description: Identifies the version of the VNFD + required: true + type: string + flavour_description: + description: Human readable description of the DF + required: true + type: string + flavour_id: + description: Identifier of the Deployment Flavour within the VNFD + required: true + type: string + lcm_operations_configuration: + description: Describes the configuration parameters for the VNF LCM operations + required: false + type: tosca.datatypes.nfv.VnfLcmOperationsConfiguration + localization_languages: + description: Information about localization languages of the VNF + entry_schema: + type: string + required: false + type: list + monitoring_parameters: + description: Describes monitoring parameters applicable to the VNF. + entry_schema: + type: tosca.datatypes.nfv.VnfMonitoringParameter + required: false + type: list + product_info_description: + description: Human readable description of the VNF Product + required: false + type: string + product_info_name: + description: Human readable name for the VNF Product + required: false + type: string + product_name: + description: Human readable name for the VNF Product + required: true + type: string + provider: + description: Provider of the VNF and of the VNFD + required: true + type: string + software_version: + description: Software version of the VNF + required: true + type: string + vnf_profile: + description: Describes a profile for instantiating VNFs of a particular NS + DF according to a specific VNFD and VNF DF + required: false + type: tosca.datatypes.nfv.VnfProfile + vnfm_info: + description: Identifies VNFM(s) compatible with the VNF + entry_schema: + constraints: + - pattern: (^etsivnfm:v[0-9]?[0-9]\.[0-9]?[0-9]\.[0-9]?[0-9]$)|(^[0-9]+:[a-zA-Z0-9.-]+$) + type: string + required: true + type: list + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + occurrences: + - 0 + - 1 + relationship: tosca.relationships.nfv.VirtualLinksTo + tosca.nodes.nfv.Vdu.Compute: + capabilities: + virtual_binding: + occurrences: + - 1 + - UNBOUNDED + type: tosca.capabilities.nfv.VirtualBindable + virtual_compute: + occurrences: + - 1 + - 1 + type: tosca.capabilities.nfv.VirtualCompute + derived_from: tosca.nodes.Root + description: Describes the virtual compute part of a VDU which is a construct supporting + the description of the deployment and operational behavior of a VNFC + properties: + boot_data: + description: Contains a string or a URL to a file contained in the VNF package + used to customize a virtualised compute resource at boot time. The bootData + may contain variable parts that are replaced by deployment specific values + before being sent to the VIM. + required: false + type: string + boot_order: + description: References a node template name from which a valid boot device + is created + entry_schema: + type: string + required: false + type: list + description: + description: Human readable description of the VDU + required: true + type: string + monitoring_parameters: + description: Describes monitoring parameters applicable to a VNFC instantiated + from this VDU + entry_schema: + type: tosca.datatypes.nfv.VnfcMonitoringParameter + required: false + type: list + name: + description: Human readable name of the VDU + required: true + type: string + nfvi_constraints: + description: Describes constraints on the NFVI for the VNFC instance(s) created + from this VDU + entry_schema: + type: string + required: false + type: list + sw_image_data: + description: Defines information related to a SwImage artifact used by this + Vdu.Compute node + required: false + type: tosca.datatypes.nfv.SwImageData + vdu_profile: + description: Defines additional instantiation data for the VDU.Compute node + required: true + type: tosca.datatypes.nfv.VduProfile + requirements: + - virtual_storage: + capability: tosca.capabilities.nfv.VirtualStorage + occurrences: + - 0 + - UNBOUNDED + relationship: tosca.relationships.nfv.AttachesTo + tosca.nodes.nfv.Vdu.VirtualBlockStorage: + capabilities: + virtual_storage: + description: Defines the capabilities of virtual_storage. + type: tosca.capabilities.nfv.VirtualStorage + derived_from: tosca.nodes.Root + description: This node type describes the specifications of requirements related + to virtual block storage resources + properties: + sw_image_data: + description: Defines information related to a SwImage artifact used by this + Vdu.Compute node. + required: false + type: tosca.datatypes.nfv.SwImageData + virtual_block_storage_data: + description: Describes the block storage characteristics. + required: true + type: tosca.datatypes.nfv.VirtualBlockStorageData + tosca.nodes.nfv.Vdu.VirtualFileStorage: + capabilities: + virtual_storage: + description: Defines the capabilities of virtual_storage. + type: tosca.capabilities.nfv.VirtualStorage + derived_from: tosca.nodes.Root + description: This node type describes the specifications of requirements related + to virtual file storage resources + properties: + virtual_file_storage_data: + description: Describes the file storage characteristics. + required: true + type: tosca.datatypes.nfv.VirtualFileStorageData + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + tosca.nodes.nfv.Vdu.VirtualObjectStorage: + capabilities: + virtual_storage: + description: Defines the capabilities of virtual_storage. + type: tosca.capabilities.nfv.VirtualStorage + derived_from: tosca.nodes.Root + description: This node type describes the specifications of requirements related + to virtual object storage resources + properties: + virtual_object_storage_data: + description: Describes the object storage characteristics. + required: true + type: tosca.datatypes.nfv.VirtualObjectStorageData + tosca.nodes.nfv.VduCp: + derived_from: tosca.nodes.nfv.Cp + description: describes network connectivity between a VNFC instance based on this + VDU and an internal VL + properties: + bitrate_requirement: + constraints: + - greater_or_equal: 0 + description: Bitrate requirement in bit per second on this connection point + required: false + type: integer + order: + constraints: + - greater_or_equal: 0 + description: The order of the NIC on the compute instance (e.g.eth2) + required: false + type: integer + virtual_network_interface_requirements: + description: Specifies requirements on a virtual network interface realising + the CPs instantiated from this CPD + entry_schema: + type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements + required: false + type: list + vnic_type: + constraints: + - valid_values: + - normal + - virtio + - direct-physical + description: Describes the type of the virtual network interface realizing + the CPs instantiated from this CPD + required: false + type: string + requirements: + - virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + - virtual_binding: + capability: tosca.capabilities.nfv.VirtualBindable + node: tosca.nodes.nfv.Vdu.Compute + relationship: tosca.relationships.nfv.VirtualBindsTo + tosca.nodes.nfv.VnfExtCp: + derived_from: tosca.nodes.nfv.Cp + description: Describes a logical external connection point, exposed by the VNF + enabling connection with an external Virtual Link + properties: + virtual_network_interface_requirements: + description: The actual virtual NIC requirements that is been assigned when + instantiating the connection point + entry_schema: + type: tosca.datatypes.nfv.VirtualNetworkInterfaceRequirements + required: false + type: list + requirements: + - external_virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + - internal_virtual_link: + capability: tosca.capabilities.nfv.VirtualLinkable + relationship: tosca.relationships.nfv.VirtualLinksTo + tosca.nodes.nfv.VnfVirtualLink: + capabilities: + virtual_linkable: + type: tosca.capabilities.nfv.VirtualLinkable + derived_from: tosca.nodes.Root + description: Describes the information about an internal VNF VL + properties: + connectivity_type: + description: Specifies the protocol exposed by the VL and the flow pattern + supported by the VL + required: true + type: tosca.datatypes.nfv.ConnectivityType + description: + description: Provides human-readable information on the purpose of the VL + required: false + type: string + monitoring_parameters: + description: Describes monitoring parameters applicable to the VL + entry_schema: + type: tosca.datatypes.nfv.VirtualLinkMonitoringParameter + required: false + type: list + test_access: + description: Test access facilities available on the VL + entry_schema: + constraints: + - valid_values: + - passive_monitoring + - active_loopback + type: string + required: false + type: list + vl_profile: + description: Defines additional data for the VL + required: true + type: tosca.datatypes.nfv.VlProfile +policy_types: + tosca.policies.nfv.AffinityRule: + derived_from: tosca.policies.Placement + description: The AffinityRule describes the affinity rules applicable for the + defined targets + properties: + scope: + constraints: + - valid_values: + - nfvi_node + - zone + - zone_group + - nfvi_pop + description: scope of the rule is an NFVI_node, an NFVI_PoP, etc. + required: true + type: string + targets: + - tosca.nodes.nfv.Vdu.Compute + - tosca.nodes.nfv.VnfVirtualLink + - tosca.groups.nfv.PlacementGroup + tosca.policies.nfv.AntiAffinityRule: + derived_from: tosca.policies.Placement + description: The AntiAffinityRule describes the anti-affinity rules applicable + for the defined targets + properties: + scope: + constraints: + - valid_values: + - nfvi_node + - zone + - zone_group + - nfvi_pop + description: scope of the rule is an NFVI_node, an NFVI_PoP, etc. + required: true + type: string + targets: + - tosca.nodes.nfv.Vdu.Compute + - tosca.nodes.nfv.VnfVirtualLink + - tosca.groups.nfv.PlacementGroup + tosca.policies.nfv.InstantiationLevels: + derived_from: tosca.policies.Root + description: The InstantiationLevels type is a policy type representing all the + instantiation levels of resources to be instantiated within a deployment flavour + and including default instantiation level in term of the number of VNFC instances + to be created as defined in ETSI GS NFV-IFA 011 [1]. + properties: + default_level: + description: The default instantiation level for this flavour. + required: false + type: string + levels: + constraints: + - min_length: 1 + description: Describes the various levels of resources that can be used to + instantiate the VNF using this flavour. + entry_schema: + type: tosca.datatypes.nfv.InstantiationLevel + required: true + type: map + tosca.policies.nfv.ScalingAspects: + derived_from: tosca.policies.Root + description: The ScalingAspects type is a policy type representing the scaling + aspects used for horizontal scaling as defined in ETSI GS NFV-IFA 011 [1]. + properties: + aspects: + constraints: + - min_length: 1 + description: Describe maximum scale level for total number of scaling steps + that can be applied to a particular aspect + entry_schema: + type: tosca.datatypes.nfv.ScalingAspect + required: true + type: map + tosca.policies.nfv.SecurityGroupRule: + derived_from: tosca.policies.Root + description: The SecurityGroupRule type is a policy type specified the matching + criteria for the ingress and/or egress traffic to/from visited connection points + as defined in ETSI GS NFV-IFA 011 [1]. + properties: + description: + description: Human readable description of the security group rule. + required: false + type: string + direction: + constraints: + - valid_values: + - ingress + - egress + default: ingress + description: The direction in which the security group rule is applied. The + direction of 'ingress' or 'egress' is specified against the associated CP. + I.e., 'ingress' means the packets entering a CP, while 'egress' means the + packets sent out of a CP. + required: false + type: string + ether_type: + constraints: + - valid_values: + - ipv4 + - ipv6 + default: ipv4 + description: Indicates the protocol carried over the Ethernet layer. + required: false + type: string + port_range_max: + constraints: + - greater_or_equal: 0 + - less_or_equal: 65535 + default: 65535 + description: Indicates maximum port number in the range that is matched by + the security group rule. If a value is provided at design-time, this value + may be overridden at run-time based on other deployment requirements or + constraints. + required: false + type: integer + port_range_min: + constraints: + - greater_or_equal: 0 + - less_or_equal: 65535 + default: 0 + description: Indicates minimum port number in the range that is matched by + the security group rule. If a value is provided at design-time, this value + may be overridden at run-time based on other deployment requirements or + constraints. + required: false + type: integer + protocol: + constraints: + - valid_values: + - hopopt + - icmp + - igmp + - ggp + - ipv4 + - st + - tcp + - cbt + - egp + - igp + - bbn_rcc_mon + - nvp_ii + - pup + - argus + - emcon + - xnet + - chaos + - udp + - mux + - dcn_meas + - hmp + - prm + - xns_idp + - trunk_1 + - trunk_2 + - leaf_1 + - leaf_2 + - rdp + - irtp + - iso_tp4 + - netblt + - mfe_nsp + - merit_inp + - dccp + - 3pc + - idpr + - xtp + - ddp + - idpr_cmtp + - tp++ + - il + - ipv6 + - sdrp + - ipv6_route + - ipv6_frag + - idrp + - rsvp + - gre + - dsr + - bna + - esp + - ah + - i_nlsp + - swipe + - narp + - mobile + - tlsp + - skip + - ipv6_icmp + - ipv6_no_nxt + - ipv6_opts + - cftp + - sat_expak + - kryptolan + - rvd + - ippc + - sat_mon + - visa + - ipcv + - cpnx + - cphb + - wsn + - pvp + - br_sat_mon + - sun_nd + - wb_mon + - wb_expak + - iso_ip + - vmtp + - secure_vmtp + - vines + - ttp + - iptm + - nsfnet_igp + - dgp + - tcf + - eigrp + - ospfigp + - sprite_rpc + - larp + - mtp + - ax.25 + - ipip + - micp + - scc_sp + - etherip + - encap + - gmtp + - ifmp + - pnni + - pim + - aris + - scps + - qnx + - a/n + - ip_comp + - snp + - compaq_peer + - ipx_in_ip + - vrrp + - pgm + - l2tp + - ddx + - iatp + - stp + - srp + - uti + - smp + - sm + - ptp + - isis + - fire + - crtp + - crudp + - sscopmce + - iplt + - sps + - pipe + - sctp + - fc + - rsvp_e2e_ignore + - mobility + - udp_lite + - mpls_in_ip + - manet + - hip + - shim6 + - wesp + - rohc + default: tcp + description: Indicates the protocol carried over the IP layer. Permitted values + include any protocol defined in the IANA protocol registry, e.g. TCP, UDP, + ICMP, etc. + required: false + type: string + targets: + - tosca.nodes.nfv.VduCp + - tosca.nodes.nfv.VnfExtCp + tosca.policies.nfv.SupportedVnfInterface: + derived_from: tosca.policies.Root + description: this policy type represents interfaces produced by a VNF, the details + to access them and the applicable connection points to use to access these interfaces + properties: + details: + description: Provide additional data to access the interface endpoint + required: false + type: tosca.datatypes.nfv.InterfaceDetails + interface_name: + constraints: + - valid_values: + - vnf_indicator + - vnf_configuration + description: Identifies an interface produced by the VNF. + required: true + type: string + targets: + - tosca.nodes.nfv.VnfExtCp + - tosca.nodes.nfv.VduCp + tosca.policies.nfv.VduInitialDelta: + derived_from: tosca.policies.Root + description: The VduInitialDelta type is a policy type representing the Vdu.Compute + detail of an initial delta used for horizontal scaling, as defined in ETSI GS + NFV-IFA 011 [1]. + properties: + initial_delta: + description: Represents the initial minimum size of the VNF. + required: true + type: tosca.datatypes.nfv.VduLevel + targets: + - tosca.nodes.nfv.Vdu.Compute + tosca.policies.nfv.VduInstantiationLevels: + derived_from: tosca.policies.Root + description: The VduInstantiationLevels type is a policy type representing all + the instantiation levels of resources to be instantiated within a deployment + flavour in term of the number of VNFC instances to be created from each vdu.Compute. + as defined in ETSI GS NFV-IFA 011 [1] + properties: + levels: + constraints: + - min_length: 1 + description: Describes the Vdu.Compute levels of resources that can be used + to instantiate the VNF using this flavour + entry_schema: + type: tosca.datatypes.nfv.VduLevel + required: true + type: map + targets: + - tosca.nodes.nfv.Vdu.Compute + tosca.policies.nfv.VduScalingAspectDeltas: + derived_from: tosca.policies.Root + description: The VduScalingAspectDeltas type is a policy type representing the + Vdu.Compute detail of an aspect deltas used for horizontal scaling, as defined + in ETSI GS NFV-IFA 011 [1]. + properties: + aspect: + description: Represents the scaling aspect to which this policy applies + required: true + type: string + deltas: + constraints: + - min_length: 1 + description: Describes the Vdu.Compute scaling deltas to be applied for every + scaling steps of a particular aspect. + entry_schema: + type: tosca.datatypes.nfv.VduLevel + required: true + type: map + targets: + - tosca.nodes.nfv.Vdu.Compute + tosca.policies.nfv.VirtualLinkBitrateInitialDelta: + derived_from: tosca.policies.Root + description: The VirtualLinkBitrateInitialDelta type is a policy type representing + the VnfVirtualLink detail of an initial deltas used for horizontal scaling, + as defined in ETSI GS NFV-IFA 011 [1]. + properties: + initial_delta: + description: Represents the initial minimum size of the VNF. + required: true + type: tosca.datatypes.nfv.VirtualLinkBitrateLevel + targets: + - tosca.nodes.nfv.VnfVirtualLink + tosca.policies.nfv.VirtualLinkBitrateScalingAspectDeltas: + derived_from: tosca.policies.Root + description: The VirtualLinkBitrateScalingAspectDeltas type is a policy type representing + the VnfVirtualLink detail of an aspect deltas used for horizontal scaling, as + defined in ETSI GS NFV-IFA 011 [1]. + properties: + aspect: + description: Represents the scaling aspect to which this policy applies. + required: true + type: string + deltas: + constraints: + - min_length: 1 + description: Describes the VnfVirtualLink scaling deltas to be applied for + every scaling steps of a particular aspect. + entry_schema: + type: tosca.datatypes.nfv.VirtualLinkBitrateLevel + required: true + type: map + targets: + - tosca.nodes.nfv.VnfVirtualLink + tosca.policies.nfv.VirtualLinkInstantiationLevels: + derived_from: tosca.policies.Root + description: The VirtualLinkInstantiationLevels type is a policy type representing + all the instantiation levels of virtual link resources to be instantiated within + a deployment flavour as defined in ETSI GS NFV-IFA 011 [1]. + properties: + levels: + constraints: + - min_length: 1 + description: Describes the virtual link levels of resources that can be used + to instantiate the VNF using this flavour. + entry_schema: + type: tosca.datatypes.nfv.VirtualLinkBitrateLevel + required: true + type: map + targets: + - tosca.nodes.nfv.VnfVirtualLink +relationship_types: + tosca.relationships.nfv.AttachesTo: + derived_from: tosca.relationships.Root + description: Represents an association relationship between the Vdu.Compute and + one of the node types, Vdu.VirtualBlockStorage, Vdu.VirtualObjectStorage or + Vdu.VirtualFileStorage + valid_target_types: + - tosca.capabilities.nfv.VirtualStorage + tosca.relationships.nfv.VirtualBindsTo: + derived_from: tosca.relationships.DependsOn + description: Represents an association relationship between Vdu.Compute and VduCp + node types + valid_target_types: + - tosca.capabilities.nfv.VirtualBindable +tosca_definitions_version: tosca_simple_yaml_1_2 diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_df_simple.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_df_simple.yaml new file mode 100644 index 000000000..52fdc80d3 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_df_simple.yaml @@ -0,0 +1,396 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 + +description: Simple deployment flavour for Sample VNF + +imports: + - etsi_nfv_sol001_common_types.yaml + - etsi_nfv_sol001_vnfd_types.yaml + - helloworld3_types.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 + + substitution_mappings: + node_type: company.provider.VNF + properties: + flavour_id: simple + requirements: + virtual_link_external1_1: [ VDU1_CP1, virtual_link ] + virtual_link_external1_2: [ VDU2_CP1, virtual_link ] + virtual_link_external2_1: [ VDU1_CP2, virtual_link ] + virtual_link_external2_2: [ VDU2_CP2, virtual_link ] + + node_templates: + VNF: + type: company.provider.VNF + properties: + flavour_description: A simple flavour + interfaces: + Vnflcm: + instantiate: [] + instantiate_start: [] + instantiate_end: [] + terminate: [] + terminate_start: [] + terminate_end: [] + modify_information: [] + modify_information_start: [] + modify_information_end: [] + + VDU1: + type: tosca.nodes.nfv.Vdu.Compute + properties: + name: VDU1 + description: VDU1 compute node + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 3 + sw_image_data: + name: cirros-0.5.2-x86_64-disk + version: '0.5.2' + checksum: + algorithm: sha-256 + hash: 932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464 + container_format: bare + disk_format: qcow2 + min_disk: 0 GB + min_ram: 256 MB + size: 12 GB + + capabilities: + virtual_compute: + properties: + requested_additional_capabilities: + properties: + requested_additional_capability_name: m1.tiny + 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: 3 GB + + VDU2: + type: tosca.nodes.nfv.Vdu.Compute + properties: + name: VDU2 + description: VDU2 compute node + vdu_profile: + min_number_of_instances: 1 + max_number_of_instances: 1 + sw_image_data: + name: cirros-0.5.2-x86_64-disk + version: '0.5.2' + checksum: + algorithm: sha-256 + hash: 932fcae93574e242dc3d772d5235061747dfe537668443a1f0567d893614b464 + container_format: bare + disk_format: qcow2 + min_disk: 0 GB + min_ram: 256 MB + size: 12 GB + + capabilities: + virtual_compute: + properties: + requested_additional_capabilities: + properties: + requested_additional_capability_name: m1.tiny + 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: 3 GB + + VDU1_CP1: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU1 + + VDU1_CP2: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU1 + + VDU1_CP3: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU1 + - virtual_link: internalVL1 + + VDU1_CP4: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 3 + requirements: + - virtual_binding: VDU1 + - virtual_link: internalVL2 + + VDU1_CP5: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 4 + requirements: + - virtual_binding: VDU1 + - virtual_link: internalVL3 + + VDU2_CP1: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 0 + requirements: + - virtual_binding: VDU2 + + VDU2_CP2: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 1 + requirements: + - virtual_binding: VDU2 + + VDU2_CP3: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 2 + requirements: + - virtual_binding: VDU2 + - virtual_link: internalVL1 + + VDU2_CP4: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 3 + requirements: + - virtual_binding: VDU2 + - virtual_link: internalVL2 + + VDU2_CP5: + type: tosca.nodes.nfv.VduCp + properties: + layer_protocols: [ ipv4 ] + order: 4 + requirements: + - virtual_binding: VDU2 + - virtual_link: internalVL3 + + internalVL1: + type: tosca.nodes.nfv.VnfVirtualLink + properties: + connectivity_type: + layer_protocols: [ ipv4 ] + description: External Managed Virtual link in the VNF + vl_profile: + max_bitrate_requirements: + root: 1048576 + leaf: 1048576 + min_bitrate_requirements: + root: 1048576 + leaf: 1048576 + virtual_link_protocol_data: + - associated_layer_protocol: ipv4 + l3_protocol_data: + ip_version: ipv4 + cidr: 33.33.0.0/24 + + internalVL2: + type: tosca.nodes.nfv.VnfVirtualLink + properties: + connectivity_type: + layer_protocols: [ ipv4 ] + description: External Managed Virtual link in the VNF + vl_profile: + max_bitrate_requirements: + root: 1048576 + leaf: 1048576 + min_bitrate_requirements: + root: 1048576 + leaf: 1048576 + virtual_link_protocol_data: + - associated_layer_protocol: ipv4 + l3_protocol_data: + ip_version: ipv4 + cidr: 33.34.0.0/24 + + internalVL3: + type: tosca.nodes.nfv.VnfVirtualLink + properties: + connectivity_type: + layer_protocols: [ ipv4 ] + description: Internal Virtual link in the VNF + vl_profile: + max_bitrate_requirements: + root: 1048576 + leaf: 1048576 + min_bitrate_requirements: + root: 1048576 + leaf: 1048576 + virtual_link_protocol_data: + - associated_layer_protocol: ipv4 + l3_protocol_data: + ip_version: ipv4 + cidr: 33.35.0.0/24 + + policies: + - scaling_aspects: + type: tosca.policies.nfv.ScalingAspects + properties: + aspects: + VDU1_scale: + name: VDU1_scale + description: VDU1 scaling aspect + max_scale_level: 2 + step_deltas: + - delta_1 + + - VDU1_initial_delta: + type: tosca.policies.nfv.VduInitialDelta + properties: + initial_delta: + number_of_instances: 1 + targets: [ VDU1 ] + + - VDU2_initial_delta: + type: tosca.policies.nfv.VduInitialDelta + properties: + initial_delta: + number_of_instances: 1 + targets: [ VDU2 ] + + - VDU1_scaling_aspect_deltas: + type: tosca.policies.nfv.VduScalingAspectDeltas + properties: + aspect: VDU1_scale + deltas: + delta_1: + number_of_instances: 1 + targets: [ VDU1 ] + + - instantiation_levels: + type: tosca.policies.nfv.InstantiationLevels + properties: + levels: + instantiation_level_1: + description: Smallest size + scale_info: + VDU1_scale: + scale_level: 0 + instantiation_level_2: + description: Largest size + scale_info: + VDU1_scale: + scale_level: 2 + default_level: instantiation_level_1 + + - VDU1_instantiation_levels: + type: tosca.policies.nfv.VduInstantiationLevels + properties: + levels: + instantiation_level_1: + number_of_instances: 1 + instantiation_level_2: + number_of_instances: 3 + targets: [ VDU1 ] + + - VDU2_instantiation_levels: + type: tosca.policies.nfv.VduInstantiationLevels + properties: + levels: + instantiation_level_1: + number_of_instances: 1 + instantiation_level_2: + number_of_instances: 1 + targets: [ VDU2 ] + + - internalVL1_instantiation_levels: + type: tosca.policies.nfv.VirtualLinkInstantiationLevels + properties: + levels: + instantiation_level_1: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + instantiation_level_2: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + targets: [ internalVL1 ] + + - internalVL2_instantiation_levels: + type: tosca.policies.nfv.VirtualLinkInstantiationLevels + properties: + levels: + instantiation_level_1: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + instantiation_level_2: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + targets: [ internalVL2 ] + + - internalVL3_instantiation_levels: + type: tosca.policies.nfv.VirtualLinkInstantiationLevels + properties: + levels: + instantiation_level_1: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + instantiation_level_2: + bitrate_requirements: + root: 1048576 + leaf: 1048576 + targets: [ internalVL3 ] + + - policy_antiaffinity_vdu1: + type: tosca.policies.nfv.AntiAffinityRule + targets: [ VDU1 ] + properties: + scope: zone + + - policy_antiaffinity_vdu2: + type: tosca.policies.nfv.AntiAffinityRule + targets: [ VDU2 ] + properties: + scope: zone diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_top.vnfd.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_top.vnfd.yaml new file mode 100644 index 000000000..e4d2cfaf7 --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_top.vnfd.yaml @@ -0,0 +1,31 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 + +description: Sample VNF + +imports: + - etsi_nfv_sol001_common_types.yaml + - etsi_nfv_sol001_vnfd_types.yaml + - helloworld3_types.yaml + - helloworld3_df_simple.yaml + +topology_template: + inputs: + selected_flavour: + type: string + description: VNF deployment flavour selected by the consumer. It is provided in the API + + node_templates: + VNF: + type: company.provider.VNF + properties: + flavour_id: { get_input: selected_flavour } + descriptor_id: ebed82b2-3bb1-421a-a065-40cf5a5f8381 + provider: Company + product_name: Sample VNF + software_version: '1.0' + descriptor_version: '1.0' + vnfm_info: + - Tacker + requirements: + #- virtual_link_external # mapped in lower-level templates + #- virtual_link_internal # mapped in lower-level templates diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_types.yaml b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_types.yaml new file mode 100644 index 000000000..68fc8ec8b --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/Definitions/helloworld3_types.yaml @@ -0,0 +1,55 @@ +tosca_definitions_version: tosca_simple_yaml_1_2 + +description: VNF type definition + +imports: + - etsi_nfv_sol001_common_types.yaml + - etsi_nfv_sol001_vnfd_types.yaml + +node_types: + company.provider.VNF: + derived_from: tosca.nodes.nfv.VNF + properties: + descriptor_id: + type: string + constraints: [ valid_values: [ ebed82b2-3bb1-421a-a065-40cf5a5f8381 ] ] + default: ebed82b2-3bb1-421a-a065-40cf5a5f8381 + descriptor_version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + provider: + type: string + constraints: [ valid_values: [ 'Company' ] ] + default: 'Company' + product_name: + type: string + constraints: [ valid_values: [ 'Sample VNF' ] ] + default: 'Sample VNF' + software_version: + type: string + constraints: [ valid_values: [ '1.0' ] ] + default: '1.0' + vnfm_info: + type: list + entry_schema: + type: string + constraints: [ valid_values: [ Tacker ] ] + default: [ Tacker ] + flavour_id: + type: string + constraints: [ valid_values: [ simple ] ] + default: simple + flavour_description: + type: string + default: "falvour" + requirements: + - virtual_link_external1: + capability: tosca.capabilities.nfv.VirtualLinkable + - virtual_link_external2: + capability: tosca.capabilities.nfv.VirtualLinkable + - virtual_link_internal: + capability: tosca.capabilities.nfv.VirtualLinkable + interfaces: + Vnflcm: + type: tosca.interfaces.nfv.Vnflcm diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/TOSCA-Metadata/TOSCA.meta b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/TOSCA-Metadata/TOSCA.meta new file mode 100644 index 000000000..cfd7444ac --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/TOSCA-Metadata/TOSCA.meta @@ -0,0 +1,4 @@ +TOSCA-Meta-File-Version: 1.0 +CSAR-Version: 1.1 +Created-by: Onboarding portal +Entry-Definitions: Definitions/helloworld3_top.vnfd.yaml diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/UserData/__init__.py b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/UserData/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/UserData/lcm_user_data.py b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/UserData/lcm_user_data.py new file mode 100644 index 000000000..725c5430a --- /dev/null +++ b/tacker/tests/etc/samples/etsi/nfv/user_data_sample_virtual_storage_missing/UserData/lcm_user_data.py @@ -0,0 +1,35 @@ +# +# 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 + + +class SampleUserData(AbstractUserData): + @staticmethod + def instantiate(base_hot_dict=None, + vnfd_dict=None, + inst_req_info=None, + grant_info=None): + api_param = UserDataUtil.get_diff_base_hot_param_from_api( + base_hot_dict, inst_req_info) + initial_param_dict = \ + UserDataUtil.create_initial_param_server_port_dict( + base_hot_dict) + vdu_flavor_dict = \ + UserDataUtil.create_vdu_flavor_capability_name_dict(vnfd_dict) + vdu_image_dict = UserDataUtil.create_sw_image_dict(vnfd_dict) + cpd_vl_dict = UserDataUtil.create_network_dict( + inst_req_info, initial_param_dict) + final_param_dict = UserDataUtil.create_final_param_dict( + initial_param_dict, vdu_flavor_dict, vdu_image_dict, cpd_vl_dict) + return {**final_param_dict, **api_param} diff --git a/tacker/tests/functional/sol/vnflcm/test_vnf_instance_with_user_data.py b/tacker/tests/functional/sol/vnflcm/test_vnf_instance_with_user_data.py index 802243794..c5447e6af 100644 --- a/tacker/tests/functional/sol/vnflcm/test_vnf_instance_with_user_data.py +++ b/tacker/tests/functional/sol/vnflcm/test_vnf_instance_with_user_data.py @@ -219,6 +219,116 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest): resp, _ = self._show_subscription(subscription_id) self.assertEqual(404, resp.status_code) + def test_notification_no_virtual_storage(self): + """Test affectedVirtualStorages is absent from + + notification data when Virtual Storage does + not exist in VNFD. + + In this test case, we do following steps. + - Create subscription. + - Create VNF package. + - Upload VNF package. + - Create VNF instance. + - Instantiate VNF. + - Terminate VNF + - Delete VNF + - Delete subscription + """ + # Create subscription and register it. + callback_url = os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL, + self._testMethodName) + request_body = fake_vnflcm.Subscription.make_create_request_body( + 'http://localhost:{}{}'.format( + vnflcm_base.FAKE_SERVER_MANAGER.SERVER_PORT, + callback_url)) + resp, response_body = self._register_subscription(request_body) + self.assertEqual(201, resp.status_code) + self.assert_http_header_location_for_subscription(resp.headers) + self.assert_notification_get(callback_url) + subscription_id = response_body.get('id') + self.addCleanup( + self._delete_subscription, + subscription_id) + + # Pre Setting: Create vnf package. + sample_name = 'user_data_sample_virtual_storage_missing' + csar_package_path = os.path.abspath( + os.path.join( + os.path.dirname(__file__), + "../../../etc/samples/etsi/nfv", + sample_name)) + tempname, _ = vnflcm_base._create_csar_with_unique_vnfd_id( + csar_package_path) + # upload vnf package + vnf_package_id, vnfd_id = vnflcm_base._create_and_upload_vnf_package( + self.tacker_client, user_defined_data={ + "key": sample_name}, temp_csar_path=tempname) + + # Post Setting: Reserve deleting vnf package. + self.addCleanup(vnflcm_base._delete_vnf_package, self.tacker_client, + vnf_package_id) + + # Create vnf instance + resp, vnf_instance = self._create_vnf_instance_from_body( + fake_vnflcm.VnfInstances.make_create_request_body(vnfd_id)) + vnf_instance_id = vnf_instance['id'] + self._wait_lcm_done(vnf_instance_id=vnf_instance_id) + self.assert_create_vnf(resp, vnf_instance, vnf_package_id) + self.addCleanup(self._delete_vnf_instance, vnf_instance_id) + + # Instantiate vnf instance + request_body = fake_vnflcm.VnfInstances. \ + make_inst_request_body_include_num_dynamic( + self.vim['tenant_id'], self.ext_networks, + self.ext_mngd_networks, self.ext_link_ports, self.ext_subnets) + resp, _ = self._instantiate_vnf_instance(vnf_instance_id, request_body) + self._wait_lcm_done('COMPLETED', vnf_instance_id=vnf_instance_id) + + # Show vnf instance + resp, vnf_instance = self._show_vnf_instance(vnf_instance_id) + self.assertEqual(200, resp.status_code) + self.assertEqual(vnf_instance["instantiationState"], + "INSTANTIATED") + + callback_url = os.path.join( + vnflcm_base.MOCK_NOTIFY_CALLBACK_URL, + self._testMethodName) + notify_mock_responses = vnflcm_base.FAKE_SERVER_MANAGER.get_history( + callback_url) + vnflcm_base.FAKE_SERVER_MANAGER.clear_history( + callback_url) + + self.assertNotIn("affectedVirtualStorages", + str(notify_mock_responses[2].request_body)) + + # Terminate VNF + stack = self._get_heat_stack(vnf_instance_id) + resources_list = self._get_heat_resource_list(stack.id) + resource_name_list = [r.resource_name for r in resources_list] + glance_image_id_list = self._get_glance_image_list_from_stack_resource( + stack.id, resource_name_list) + + terminate_req_body = fake_vnflcm.VnfInstances.make_term_request_body() + resp, _ = self._terminate_vnf_instance( + vnf_instance_id, terminate_req_body) + self._wait_lcm_done('COMPLETED', vnf_instance_id=vnf_instance_id) + self.assert_terminate_vnf(resp, vnf_instance_id, stack.id, + resource_name_list, glance_image_id_list, + vnf_package_id) + + # Delete VNF + resp, _ = self._delete_vnf_instance(vnf_instance_id) + self._wait_lcm_done(vnf_instance_id=vnf_instance_id) + self.assert_delete_vnf(resp, vnf_instance_id, vnf_package_id) + + # Subscription delete + resp, response_body = self._delete_subscription(subscription_id) + self.assertEqual(204, resp.status_code) + + resp, _ = self._show_subscription(subscription_id) + self.assertEqual(404, resp.status_code) + def test_stack_update_in_scaling(self): """Test basic life cycle operations with sample VNFD. diff --git a/tacker/tests/unit/conductor/test_conductor_server.py b/tacker/tests/unit/conductor/test_conductor_server.py index 3dfebdccb..1da2f25e4 100644 --- a/tacker/tests/unit/conductor/test_conductor_server.py +++ b/tacker/tests/unit/conductor/test_conductor_server.py @@ -830,6 +830,8 @@ class TestConductor(SqlTestCase, unit_base.FixturedTestCase): '._change_vnf_status') @mock.patch('tacker.conductor.conductor_server.Conductor' '._build_instantiated_vnf_info') + @mock.patch('tacker.conductor.conductor_server.Conductor' + '.send_notification') @mock.patch.object(objects.VnfLcmOpOcc, "save") @mock.patch.object(coordination.Coordinator, 'get_lock') @mock.patch.object(objects.LccnSubscriptionRequest, @@ -843,7 +845,8 @@ class TestConductor(SqlTestCase, unit_base.FixturedTestCase): self, mock_res, mock_vnf_by_id, mock_log, mock_des, mock_vnfd_dict, mock_vnf_lcm_subscriptions_get, - mock_get_lock, mock_save, mock_build_info, + mock_get_lock, mock_save, + mock_send_notification, mock_build_info, mock_change_vnf_status, mock_update_vnf_attributes): lcm_op_occs_data = fakes.get_lcm_op_occs_data() @@ -875,6 +878,12 @@ class TestConductor(SqlTestCase, unit_base.FixturedTestCase): instantiate_vnf_req, vnf_lcm_op_occs_id) self.vnflcm_driver.instantiate_vnf.assert_called_once_with( self.context, vnf_instance, vnf_dict, instantiate_vnf_req) + self.assertNotIn("affectedVnfcs", + str(mock_send_notification.call_args[0][1])) + self.assertNotIn("affectedVirtualLinks", + str(mock_send_notification.call_args[0][1])) + self.assertNotIn("affectedVirtualStorages", + str(mock_send_notification.call_args[0][1])) mock_change_vnf_status.assert_called_with(self.context, vnf_instance.id, mock.ANY, 'ERROR') mock_update_vnf_attributes.assert_called_once() diff --git a/tacker/tests/unit/vnflcm/test_controller.py b/tacker/tests/unit/vnflcm/test_controller.py index 9a4833c22..0872d9068 100644 --- a/tacker/tests/unit/vnflcm/test_controller.py +++ b/tacker/tests/unit/vnflcm/test_controller.py @@ -3435,6 +3435,7 @@ class TestController(base.TestCase): self.assertEqual(http_client.INTERNAL_SERVER_ERROR, resp.status_code) + @mock.patch.object(vnf_lcm_rpc.VNFLcmRPCAPI, "send_notification") @mock.patch.object(controller.VnfLcmController, "_update_vnf_fail_status") @mock.patch.object(objects.VnfInstance, "save") @@ -3444,12 +3445,19 @@ class TestController(base.TestCase): def test_fail_lcm_op_occs(self, mock_lcm_get_by_id, mock_lcm_save, mock_vnf_get_by_id, mock_vnf_save, - mock_update): + mock_update, + mock_send_notification): req = fake_request.HTTPRequest.blank( '/vnf_lcm_op_occs/%s/fail' % constants.UUID) mock_lcm_get_by_id.return_value = fakes.vnflcm_fail_insta() res_dict = self.controller.fail(req, constants.UUID) self.assertEqual('FAILED', res_dict['operationState']) + self.assertNotIn("affectedVnfcs", + str(mock_send_notification.call_args[0][1])) + self.assertNotIn("affectedVirtualLinks", + str(mock_send_notification.call_args[0][1])) + self.assertNotIn("affectedVirtualStorages", + str(mock_send_notification.call_args[0][1])) @mock.patch.object(objects.VnfInstance, "get_by_id") @mock.patch.object(objects.VnfLcmOpOcc, "get_by_id")