<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def enqueue_event(self, event):
 """Enqueue the given event. The event contains host data (ip, mac, port) which will be used to update the spoofing rule for the host in the iptables. """


        LOG.debug('Enqueue iptable event %s.', event)
        if event.get('status') == 'up':
            for rule in self.rule_info:
                if (rule.mac == event.get('mac').lower() and
                        rule.port == event.get('port')):
                    # Entry already exist in the list.
                    if rule.ip != event.get('ip'):
                        LOG.debug('enqueue_event: Only updating IP from %s'
                                  ' to %s.' % (rule.ip, event.get('ip')))
                        # Only update the IP address if it is different.
                        rule.ip = event.get('ip')
                        return

        self._iptq.put(event)