'Tests whether a given match object matches this entry
Used for, e.g., flow_mod updates
If out_port is any value besides None, the the flow entry must contain an
output action to the specified port.'

def is_matched_by(self, match, priority=None, strict=False, out_port=None):

    match_a = (lambda a: (isinstance(a, ofp_action_output) and (a.port == out_port)))
    port_matches = ((out_port is None) or any((match_a(a) for a in self.actions)))
    if strict:
        return (port_matches and (self.match == match) and (self.priority == priority))
    else:
        return (port_matches and match.matches_with_wildcards(self.match))
