Skip to content

Commit

Permalink
refactor: unused method KubeRayNodeProvider._url
Browse files Browse the repository at this point in the history
  • Loading branch information
ltbringer committed Nov 15, 2024
1 parent e284e72 commit 06abcac
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions python/ray/autoscaler/_private/kuberay/node_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,21 +535,6 @@ def _submit_raycluster_patch(self, patch_payload: List[Dict[str, Any]]):
path = "rayclusters/{}".format(self.cluster_name)
self._patch(path, patch_payload)

def _url(self, path: str, kubernetes_host: str = KUBERNETES_HOST) -> str:
"""Convert resource path to REST URL for Kubernetes API server."""
kubernetes_host = get_kubernetes_host(kubernetes_host)
if path.startswith("pods"):
api_group = "/api/v1"
elif path.startswith("rayclusters"):
api_group = "/apis/ray.io/" + KUBERAY_CRD_VER
else:
raise NotImplementedError(
"Tried to access unknown entity at {}".format(path)
)
return (
kubernetes_host + api_group + "/namespaces/" + self.namespace + "/" + path
)

def _get(self, path: str) -> Dict[str, Any]:
"""Wrapper for REST GET of resource with proper headers."""
return self.k8s_api_client.get(path)
Expand Down

0 comments on commit 06abcac

Please sign in to comment.