Skip to content

Commit

Permalink
[Refactor] Remove unused KubeRayNodeProvider._url method. (ray-proj…
Browse files Browse the repository at this point in the history
…ect#48714)

Signed-off-by: ltbringer <amresh.venugopal@wise.com>
Signed-off-by: hjiang <dentinyhao@gmail.com>
  • Loading branch information
ltbringer authored and dentiny committed Dec 7, 2024
1 parent 8dbc865 commit 8a8c6b2
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions python/ray/autoscaler/_private/kuberay/node_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,25 +522,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) -> str:
"""Convert resource path to REST URL for Kubernetes API server."""
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 (
"https://kubernetes.default:443"
+ 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 8a8c6b2

Please sign in to comment.