Implemented passing docker config depended methods. Review: https://reviews.apache.org/r/59015
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/618a101c Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/618a101c Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/618a101c Branch: refs/heads/master Commit: 618a101ca8d6d3211a280c9d0ebb062835296ff0 Parents: 429eca0 Author: Gilbert Song <songzihao1...@gmail.com> Authored: Wed May 3 16:40:09 2017 -0700 Committer: Gilbert Song <songzihao1...@gmail.com> Committed: Thu May 25 01:04:30 2017 +0800 ---------------------------------------------------------------------- .../mesos/provisioner/docker/registry_puller.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/618a101c/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp b/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp index f14b4a5..a5f299a 100644 --- a/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp +++ b/src/slave/containerizer/mesos/provisioner/docker/registry_puller.cpp @@ -83,7 +83,8 @@ private: Future<vector<string>> __pull( const spec::ImageReference& reference, const string& directory, - const string& backend); + const string& backend, + const Option<Secret::Value>& config); Future<vector<string>> ___pull( const spec::ImageReference& reference, @@ -96,7 +97,8 @@ private: const spec::ImageReference& reference, const string& directory, const spec::v2::ImageManifest& manifest, - const string& backend); + const string& backend, + const Option<Secret::Value>& config); RegistryPullerProcess(const RegistryPullerProcess&) = delete; RegistryPullerProcess& operator=(const RegistryPullerProcess&) = delete; @@ -287,14 +289,15 @@ Future<vector<string>> RegistryPullerProcess::_pull( << "' to '" << directory << "'"; return fetcher->fetch(manifestUri, directory) - .then(defer(self(), &Self::__pull, reference, directory, backend)); + .then(defer(self(), &Self::__pull, reference, directory, backend, config)); } Future<vector<string>> RegistryPullerProcess::__pull( const spec::ImageReference& reference, const string& directory, - const string& backend) + const string& backend, + const Option<Secret::Value>& config) { Try<string> _manifest = os::read(path::join(directory, "manifest")); if (_manifest.isError()) { @@ -315,7 +318,7 @@ Future<vector<string>> RegistryPullerProcess::__pull( return Failure("'fsLayers' and 'history' have different size in manifest"); } - return fetchBlobs(reference, directory, manifest.get(), backend) + return fetchBlobs(reference, directory, manifest.get(), backend, config) .then(defer(self(), &Self::___pull, reference, @@ -430,7 +433,8 @@ Future<hashset<string>> RegistryPullerProcess::fetchBlobs( const spec::ImageReference& reference, const string& directory, const spec::v2::ImageManifest& manifest, - const string& backend) + const string& backend, + const Option<Secret::Value>& config) { // First, find all the blobs that need to be fetched. //