MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / _gateway_endpoint

Function _gateway_endpoint

e2e/python/oidc/oidc_auth_test.py:70–79  ·  view source on GitHub ↗

Read the active gateway endpoint from metadata.

()

Source from the content-addressed store, hash-verified

68
69
70def _gateway_endpoint() -> tuple[str, bool]:
71 """Read the active gateway endpoint from metadata."""
72 cluster_name = os.environ.get("OPENSHELL_GATEWAY", "openshell")
73 metadata_path = (
74 _xdg_config_home() / "openshell" / "gateways" / cluster_name / "metadata.json"
75 )
76 metadata = json.loads(metadata_path.read_text())
77 endpoint = metadata["gateway_endpoint"]
78 is_tls = endpoint.startswith("https://")
79 return endpoint, is_tls
80
81
82def _mtls_dir() -> Path:

Callers 1

_grpc_channelFunction · 0.85

Calls 2

_xdg_config_homeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected