Skip to content

Commit

Permalink
Make "/butler" URL prefix variable in client
Browse files Browse the repository at this point in the history
For phalanx deployments, all butler servers will have the same hostname but live under different paths.
  • Loading branch information
dhirving committed Nov 2, 2023
1 parent c83f75c commit 5b569d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/lsst/daf/butler/remote_butler/_remote_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,7 @@ def _get_url(self, path: str, version: str = "v1") -> str:
Parameters
----------
path : `str`
The relative path to the server endpoint. Should not include the
"/butler" prefix.
The relative path to the server endpoint
version : `str`, optional
Version string to prepend to path. Defaults to "v1".
Expand All @@ -336,5 +335,4 @@ def _get_url(self, path: str, version: str = "v1") -> str:
path : `str`
The full path to the endpoint
"""
prefix = "butler"
return f"{prefix}/{version}/{path}"
return f"{version}/{path}"
1 change: 1 addition & 0 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def create_factory_dependency():

# Set up the RemoteButler that will connect to the server
cls.client = TestClient(app)
cls.client.base_url = "http://text.example/butler/"
cls.butler = _make_remote_butler(cls.client)

@classmethod
Expand Down

0 comments on commit 5b569d7

Please sign in to comment.