code: def _port_action_vxlan(self, port, segment, func):
          
  
          # If the segment is None, just log a warning message and return.
          if segment is None:
              self._log_missing_segment()
              return
  
          device_id = port.get('device_id')
          mcast_group = segment.get(api.PHYSICAL_NETWORK)
          host_id = port.get(bc.portbindings.HOST_ID)
          vni = segment.get(api.SEGMENTATION_ID)
  
          if vni and device_id and mcast_group and host_id:
              func(vni, device_id, mcast_group, host_id)
              return vni
          else:
              fields = "vni " if not vni else ""
              fields += "device_id " if not device_id else ""
              fields += "mcast_group " if not mcast_group else ""
              fields += "host_id" if not host_id else ""
              raise excep.NexusMissingRequiredFields(fields=fields)
docs: Verify configuration and then process event.