-
- # skip external SAPs, they already have an ip
- vnf_id, vnf_interface, vnf_sap_docker_name = parse_interface(
- intf)
- if vnf_sap_docker_name in self.saps_ext:
- elan_vnf_list.append(
- {'name': vnf_sap_docker_name, 'interface': vnf_interface})
- continue
-
- ip_address = "{0}/{1}".format(str(lan_hosts.pop(0)),
- lan_net.prefixlen)
- vnf_id, intf_name, vnf_sap_id = parse_interface(intf)
-
- # make sure we use the correct sap vnf name
- src_docker_name = vnf_id
- if vnf_sap_id in self.saps_int:
- src_docker_name = vnf_sap_id
- vnf_id = vnf_sap_id
-
- LOG.debug(
- "Setting up E-LAN interface. (%s:%s) -> %s" % (
- vnf_id, intf_name, ip_address))
-
- # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-LAN
- # E-LAN relies on the learning switch capability of Ryu which has to be turned on in the topology
- # (DCNetwork(controller=RemoteController, enable_learning=True)), so no explicit chaining is necessary.
- vnfi = self._get_vnf_instance(instance_uuid, vnf_id)
- if vnfi is not None:
- self._vnf_reconfigure_network(vnfi, intf_name, ip_address)
- # add this vnf and interface to the E-LAN for tagging
- elan_vnf_list.append(
- {'name': src_docker_name, 'interface': intf_name})
-
+ vnf_id, intf_name, _ = parse_interface(intf)
+ if vnf_id is None:
+ continue # skip references to NS connection points
+ units = self._get_vnf_instance_units(instance_uuid, vnf_id)
+ if units is None:
+ continue # skip if no deployment unit is present
+ # iterate over all involved deployment units
+ for uvnfi in units:
+ # Attention: we apply a simplification for multi DU VNFs here:
+ # the connection points of all involved DUs have to have the same
+ # name as the connection points of the surrounding VNF to be mapped.
+ # This is because we do not consider links specified in the VNFds
+ container_name = uvnfi.name
+ ip_address = "{0}/{1}".format(str(lan_hosts.pop(0)),
+ lan_net.prefixlen)
+ LOG.debug(
+ "Setting up E-LAN/E-Tree interface. (%s:%s) -> %s" % (
+ container_name, intf_name, ip_address))
+ # re-configure the VNFs IP assignment and ensure that a new subnet is used for each E-LAN
+ # E-LAN relies on the learning switch capability of Ryu which has to be turned on in the topology
+ # (DCNetwork(controller=RemoteController, enable_learning=True)), so no explicit chaining is
+ # necessary.
+ vnfi = self._get_vnf_instance(instance_uuid, container_name)
+ if vnfi is not None:
+ self._vnf_reconfigure_network(vnfi, intf_name, ip_address)
+ # add this vnf and interface to the E-LAN for tagging
+ elan_vnf_list.append(
+ {'name': container_name, 'interface': intf_name})