diff --git a/osbuild/sources.py b/osbuild/sources.py index bbeab1b3..95659100 100644 --- a/osbuild/sources.py +++ b/osbuild/sources.py @@ -67,8 +67,8 @@ class SourceService(host.Service): """Performs the actual fetch of an element described by its checksum and its descriptor""" @abc.abstractmethod - def download(self, items: Dict) -> None: - """Download all sources.""" + def fetch_all(self, items: Dict) -> None: + """Fetch all sources.""" def exists(self, checksum, _desc) -> bool: """Returns True if the item to download is in cache. """ @@ -94,7 +94,7 @@ class SourceService(host.Service): if method == "download": self.setup(args) with tempfile.TemporaryDirectory(prefix=".unverified-", dir=self.cache) as self.tmpdir: - self.download(SourceService.load_items(fds)) + self.fetch_all(SourceService.load_items(fds)) return None, None raise host.ProtocolError("Unknown method") diff --git a/sources/org.osbuild.curl b/sources/org.osbuild.curl index d56bac56..086c97ba 100755 --- a/sources/org.osbuild.curl +++ b/sources/org.osbuild.curl @@ -117,7 +117,7 @@ class CurlSource(sources.SourceService): quoted = purl._replace(path=path) return quoted.geturl() - def download(self, items: Dict) -> None: + def fetch_all(self, items: Dict) -> None: filtered = filter(lambda i: not self.exists(i[0], i[1]), items.items()) # discards items already in cache transformed = map(lambda i: self.transform(i[0], i[1]), filtered) # prepare each item to be downloaded diff --git a/sources/org.osbuild.inline b/sources/org.osbuild.inline index 73268e8e..86313ecd 100755 --- a/sources/org.osbuild.inline +++ b/sources/org.osbuild.inline @@ -57,7 +57,7 @@ class InlineSource(sources.SourceService): content_type = "org.osbuild.files" - def download(self, items: Dict) -> None: + def fetch_all(self, items: Dict) -> None: filtered = filter(lambda i: not self.exists(i[0], i[1]), items.items()) # discards items already in cache transformed = map(lambda i: self.transform(i[0], i[1]), filtered) # prepare each item to be downloaded diff --git a/sources/org.osbuild.ostree b/sources/org.osbuild.ostree index 0adebdd2..ed590eda 100755 --- a/sources/org.osbuild.ostree +++ b/sources/org.osbuild.ostree @@ -89,7 +89,7 @@ class OSTreeSource(sources.SourceService): super().__init__(*args, **kwargs) self.repo = None - def download(self, items: Dict) -> None: + def fetch_all(self, items: Dict) -> None: filtered = filter(lambda i: not self.exists(i[0], i[1]), items.items()) # discards items already in cache transformed = map(lambda i: self.transform(i[0], i[1]), filtered) # prepare each item to be downloaded diff --git a/sources/org.osbuild.skopeo b/sources/org.osbuild.skopeo index 162eaaf8..549cd384 100755 --- a/sources/org.osbuild.skopeo +++ b/sources/org.osbuild.skopeo @@ -102,7 +102,7 @@ class SkopeoSource(sources.SourceService): return f"containers-storage:{reference}" raise RuntimeError("Unrecognized containers transport") - def download(self, items: Dict) -> None: + def fetch_all(self, items: Dict) -> None: filtered = filter(lambda i: not self.exists(i[0], i[1]), items.items()) # discards items already in cache transformed = map(lambda i: self.transform(i[0], i[1]), filtered) # prepare each item to be downloaded diff --git a/sources/org.osbuild.skopeo-index b/sources/org.osbuild.skopeo-index index f00ea5b5..4f056d52 100755 --- a/sources/org.osbuild.skopeo-index +++ b/sources/org.osbuild.skopeo-index @@ -87,7 +87,7 @@ class SkopeoIndexSource(sources.SourceService): return f"containers-storage:{reference}" raise RuntimeError("Unrecognized containers transport") - def download(self, items: Dict) -> None: + def fetch_all(self, items: Dict) -> None: filtered = filter(lambda i: not self.exists(i[0], i[1]), items.items()) # discards items already in cache transformed = map(lambda i: self.transform(i[0], i[1]), filtered) # prepare each item to be downloaded