MCPcopy Create free account
hub / github.com/alibaba/GraphScope / _get_api_client

Method _get_api_client

python/graphscope/client/session.py:956–967  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

954 return self._config
955
956 def _get_api_client(self):
957 if self._api_client is not None:
958 return self._api_client
959 try:
960 config_file = self._config.kubernetes_launcher.config_file
961 self._api_client = resolve_api_client(config_file)
962 except kube_config.ConfigException as e:
963 raise RuntimeError(
964 "Kubernetes environment not found, you may want to"
965 ' launch session locally with param cluster_type="hosts"'
966 ) from e
967 return self._api_client
968
969 def _ensure_pvc_exists(self, pvc_name, pvc_namespace):
970 _core_api = kube_client.CoreV1Api(self._get_api_client())

Callers 4

_connectMethod · 0.95
_ensure_pvc_existsMethod · 0.95
restore_from_pvcMethod · 0.95

Calls 1

resolve_api_clientFunction · 0.90

Tested by

no test coverage detected