code: def create_router(self, name, ext_network=None, admin_state_up=True):
          '''
          Creates a new router
          '''
          body = {'name': name,
                  'admin_state_up': admin_state_up}
          if ext_network:
              net_id = self._find_network_id(ext_network)
              body['external_gateway_info'] = {'network_id': net_id}
          return self.network_conn.create_router(body={'router': body}f create_router(self, name, ext_network=None, admin_state_up=True):
          '''
          Creates a new router
          '''
          body = {'name': name,
                  'admin_state_up': admin_state_up}
          if ext_network:
              net_id = self._find_network_id(ext_network)
              body['external_gateway_info'] = {'network_id': net_id}
          return self.network_conn.create_router(body={'router': body})
docs: Creates a new router