Add logging to get_version().

This commit is contained in:
Itamar Turner-Trauring 2023-04-13 09:33:18 -04:00
parent cf0d3c09f8
commit 64dbeeab8f

View File

@ -480,10 +480,17 @@ class StorageClientGeneral(object):
_client: StorageClient _client: StorageClient
@async_to_deferred @async_to_deferred
async def get_version(self): async def get_version(self) -> dict[bytes, object]:
""" """
Return the version metadata for the server. Return the version metadata for the server.
""" """
with start_action(
action_type="allmydata:storage:http-client:get-version",
):
return await self._get_version()
async def _get_version(self) -> dict[bytes, object]:
"""Implementation of get_version()."""
url = self._client.relative_url("/storage/v1/version") url = self._client.relative_url("/storage/v1/version")
response = await self._client.request("GET", url) response = await self._client.request("GET", url)
decoded_response = cast( decoded_response = cast(