def _set_external_network(self, router, ext_net_dict):
        gateway_info = router.external_gateway_info
        if gateway_info:
            ext_net_id = gateway_info['network_id']
            if ext_net_dict in ext_net_id:
                gateway_info['network'] = ext_net_dict[ext_net_id]
            else:
                msg_params = {'ext_net_id': ext_net_id, 'router_id': router.id}
                msg = _('External network "%(ext_net_id)s" expected but not '
                        'found for router "%(router_id)s".') % msg_params
                messages.error(self.request, msg)
                # gateway_info['network'] is just the network name, so putting
                # in a smallish error message in the table is reasonable.
                gateway_info['network'] = pgettext_lazy(
                    'External network not found',
                    # Translators: The usage is "<UUID of ext_net> (Not Found)"
                    u'%s (Not Found)') % ext_net_id
dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/project/routers/views.py/IndexView._set_external_network/swapped operands of `in`