util: remove storage_conf arg from get_host_storage()

Let the caller decide if a reload of the storage configuration is needed
and simplify the storage configuration reader.
This commit is contained in:
Achilleas Koutsou 2024-02-13 17:30:30 +01:00 committed by Ondřej Budai
parent 2d779a14e4
commit 6572b1b8e7
2 changed files with 10 additions and 10 deletions

View file

@ -50,7 +50,8 @@ class ContainersStorageSource(sources.SourceService):
"""
Construct the full image name that references an image with a given checksum in the local storage.
"""
conf = containers.get_host_storage(self.storage_conf)
if self.storage_conf is None:
conf = containers.get_host_storage()
driver = conf["storage"]["driver"]
graphroot = conf["storage"]["graphroot"]
runroot = conf["storage"]["runroot"]