def _MakeRapiResourceLink(method, uri):
  if uri in ["/", "/2"]:
    # Don't link these
    return None

  elif uri == "/version":
    return _EncodeRapiResourceLink(method, uri)

  elif uri.startswith("/2/"):
    return _EncodeRapiResourceLink(method, uri[len("/2/"):])

  else:
    raise ReSTError("Unhandled URI '%s'" % uri)
Generates link target name for RAPI resource.
dataset/ETHPy150Open ganeti/ganeti/lib/build/sphinx_ext.py/_MakeRapiResourceLink