(cluster_name: str)
| 46 | |
| 47 | |
| 48 | def _cluster_metadata(cluster_name: str) -> dict: |
| 49 | endpoint = os.environ.get("OPENSHELL_GATEWAY_ENDPOINT") |
| 50 | if endpoint: |
| 51 | return { |
| 52 | "name": cluster_name, |
| 53 | "gateway_endpoint": endpoint, |
| 54 | "auth_mode": "plaintext", |
| 55 | } |
| 56 | metadata_path = ( |
| 57 | _xdg_config_home() / "openshell" / "gateways" / cluster_name / "metadata.json" |
| 58 | ) |
| 59 | return json.loads(metadata_path.read_text()) |
| 60 | |
| 61 | |
| 62 | def _mtls_dir(cluster_name: str) -> pathlib.Path: |
no test coverage detected