'Return the SNAT port for the given internal interface port.'

def get_snat_port_for_internal_port(self, int_port, snat_ports=None):

    if (snat_ports is None):
        snat_ports = self.get_snat_interfaces()
    if (not snat_ports):
        return
    fixed_ips = int_port['fixed_ips']
    subnet_ids = [fixed_ip['subnet_id'] for fixed_ip in fixed_ips]
    for p in snat_ports:
        for ip in p['fixed_ips']:
            if (ip['subnet_id'] in subnet_ids):
                return p
    LOG.error(_LE('DVR:    SNAT    port    not    found    in    the    list    %(snat_list)s    for    the    given    router    internal    port    %(int_p)s'), {'snat_list': snat_ports, 'int_p': int_port})
