summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2019-01-15 11:16:35 +0000
committerJames Ennis <james.ennis@codethink.com>2019-01-15 16:53:29 +0000
commitcb6d1c46b9c17d06fb0c4f307e1e459bf0def6c1 (patch)
tree5340cb341bcf78ca574631937441d8832c388a8c
parentaceb3995e84fdbfa2adc6f9e4f61c0ce5a4e1679 (diff)
downloadbuildstream-cb6d1c46b9c17d06fb0c4f307e1e459bf0def6c1.tar.gz
artifactcache.py: Add new method ArtifactCache.create_remote()
This allows for the creation of a CASRemote object using the ArtifactCache API
-rw-r--r--buildstream/_artifactcache/artifactcache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index b4b8df320..af27a1e27 100644
--- a/buildstream/_artifactcache/artifactcache.py
+++ b/buildstream/_artifactcache/artifactcache.py
@@ -399,7 +399,7 @@ class ArtifactCache():
if remote_spec.push:
self._has_push_remotes = True
- remotes[remote_spec.url] = CASRemote(remote_spec)
+ remotes[remote_spec.url] = self.create_remote(remote_spec)
for project in self.context.get_projects():
remote_specs = self.global_remote_specs
@@ -419,6 +419,9 @@ class ArtifactCache():
self._remotes[project] = project_remotes
+ def create_remote(self, remote_spec):
+ return CASRemote(remote_spec)
+
# contains():
#
# Check whether the artifact for the specified Element is already available