def getController(self, uri):
    if "?" in uri:
      (path, query) = uri.split("?", 1)
      args = urlparse.parse_qs(query)
    else:
      path = uri
      query = None
      args = {}

    # Try to find handler for request path
    result = utils.FindMatch(self._connector, path)

    if result is None:
      raise http.HttpNotFound()

    (handler, groups) = result

    return (handler, groups, args)
Find method for a given URI.
dataset/ETHPy150Open ganeti/ganeti/lib/rapi/connector.py/Mapper.getController