def _get_router_type_driver(self, context, routertype):
if routertype is None:<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>return self._router_drivers[routertype]<EOL><DEDENT>except KeyError:<EOL><INDENT>try:<EOL><INDENT>router_type = self.get_routertype_by_id_name(context,<EOL>routertype)<EOL>if (router_type['<STR_LIT>'] == "<STR_LIT>" or<EOL>router_type['<STR_LIT>'] is None):<EOL><INDENT>self._router_drivers[routertype] = None<EOL><DEDENT>else:<EOL><INDENT>self._router_drivers[routertype] = (<EOL>importutils.import_object(router_type['<STR_LIT>']))<EOL><DEDENT><DEDENT>except (ImportError, TypeError, n_exc.NeutronException):<EOL><INDENT>LOG.exception("<STR_LIT>"<EOL>"<STR_LIT:%s>", routertype)<EOL><DEDENT>return self._router_drivers.get(routertype)<EOL><DEDENT>
Returns the driver (instance) for a router type.