def _port_action_vxlan(self, port, segment, func):
<EOL>if segment is None:<EOL><INDENT>self._log_missing_segment()<EOL>return<EOL><DEDENT>device_id = port.get('<STR_LIT>')<EOL>mcast_group = segment.get(api.PHYSICAL_NETWORK)<EOL>host_id = port.get(bc.portbindings.HOST_ID)<EOL>vni = segment.get(api.SEGMENTATION_ID)<EOL>if vni and device_id and mcast_group and host_id:<EOL><INDENT>func(vni, device_id, mcast_group, host_id)<EOL>return vni<EOL><DEDENT>else:<EOL><INDENT>fields = "<STR_LIT>" if not vni else "<STR_LIT>"<EOL>fields += "<STR_LIT>" if not device_id else "<STR_LIT>"<EOL>fields += "<STR_LIT>" if not mcast_group else "<STR_LIT>"<EOL>fields += "<STR_LIT>" if not host_id else "<STR_LIT>"<EOL>raise excep.NexusMissingRequiredFields(fields=fields)<EOL><DEDENT>
Verify configuration and then process event.