You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:18:46 UTC

[buildstream] 03/09: artifactcache.py: Add new method ArtifactCache.create_remote()

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch jennis/push_pull_artifacts
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit cb6d1c46b9c17d06fb0c4f307e1e459bf0def6c1
Author: James Ennis <ja...@codethink.com>
AuthorDate: Tue Jan 15 11:16:35 2019 +0000

    artifactcache.py: Add new method ArtifactCache.create_remote()
    
    This allows for the creation of a CASRemote object using the
    ArtifactCache API
---
 buildstream/_artifactcache/artifactcache.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buildstream/_artifactcache/artifactcache.py b/buildstream/_artifactcache/artifactcache.py
index b4b8df3..af27a1e 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