Reordered ctor parameters in RegistryClient. Review: https://reviews.apache.org/r/39184
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c5f49f62 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c5f49f62 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c5f49f62 Branch: refs/heads/master Commit: c5f49f629a01a6ad3c3675dfdfeb93ee8bfd9c35 Parents: f640188 Author: Jojy Varghese <[email protected]> Authored: Wed Oct 14 09:01:14 2015 +0800 Committer: Timothy Chen <[email protected]> Committed: Wed Oct 14 09:01:14 2015 +0800 ---------------------------------------------------------------------- .../provisioner/docker/registry_client.cpp | 24 ++++++++++---------- .../provisioner/docker/registry_client.hpp | 8 +++---- 2 files changed, 16 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/c5f49f62/src/slave/containerizer/provisioner/docker/registry_client.cpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/provisioner/docker/registry_client.cpp b/src/slave/containerizer/provisioner/docker/registry_client.cpp index c6db213..471783d 100644 --- a/src/slave/containerizer/provisioner/docker/registry_client.cpp +++ b/src/slave/containerizer/provisioner/docker/registry_client.cpp @@ -58,8 +58,8 @@ class RegistryClientProcess : public Process<RegistryClientProcess> { public: static Try<Owned<RegistryClientProcess>> create( - const URL& authServer, const URL& registry, + const URL& authServer, const Option<RegistryClient::Credentials>& creds); Future<RegistryClient::ManifestResponse> getManifest( @@ -76,8 +76,8 @@ public: private: RegistryClientProcess( - const Owned<TokenManager>& tokenMgr, const URL& registryServer, + const Owned<TokenManager>& tokenManager, const Option<RegistryClient::Credentials>& creds); Future<Response> doHttpGet( @@ -90,8 +90,8 @@ private: Try<process::http::Headers> getAuthenticationAttributes( const Response& httpResponse) const; - Owned<TokenManager> tokenManager_; const URL registryServer_; + Owned<TokenManager> tokenManager_; const Option<RegistryClient::Credentials> credentials_; RegistryClientProcess(const RegistryClientProcess&) = delete; @@ -100,8 +100,8 @@ private: Try<Owned<RegistryClient>> RegistryClient::create( - const URL& authServer, const URL& registryServer, + const URL& authServer, const Option<Credentials>& creds) { Try<Owned<RegistryClientProcess>> process = @@ -117,12 +117,12 @@ Try<Owned<RegistryClient>> RegistryClient::create( RegistryClient::RegistryClient( - const URL& authServer, const URL& registryServer, + const URL& authServer, const Option<Credentials>& creds, const Owned<RegistryClientProcess>& process) - : authServer_(authServer), - registryServer_(registryServer), + : registryServer_(registryServer), + authServer_(authServer), credentials_(creds), process_(process) { @@ -175,8 +175,8 @@ Future<size_t> RegistryClient::getBlob( Try<Owned<RegistryClientProcess>> RegistryClientProcess::create( - const URL& authServer, const URL& registryServer, + const URL& authServer, const Option<RegistryClient::Credentials>& creds) { Try<Owned<TokenManager>> tokenMgr = TokenManager::create(authServer); @@ -185,16 +185,16 @@ Try<Owned<RegistryClientProcess>> RegistryClientProcess::create( } return Owned<RegistryClientProcess>( - new RegistryClientProcess(tokenMgr.get(), registryServer, creds)); + new RegistryClientProcess(registryServer, tokenMgr.get(), creds)); } RegistryClientProcess::RegistryClientProcess( - const Owned<TokenManager>& tokenMgr, const URL& registryServer, + const Owned<TokenManager>& tokenMgr, const Option<RegistryClient::Credentials>& creds) - : tokenManager_(tokenMgr), - registryServer_(registryServer), + : registryServer_(registryServer), + tokenManager_(tokenMgr), credentials_(creds) {} http://git-wip-us.apache.org/repos/asf/mesos/blob/c5f49f62/src/slave/containerizer/provisioner/docker/registry_client.hpp ---------------------------------------------------------------------- diff --git a/src/slave/containerizer/provisioner/docker/registry_client.hpp b/src/slave/containerizer/provisioner/docker/registry_client.hpp index c4f19c3..1d3377e 100644 --- a/src/slave/containerizer/provisioner/docker/registry_client.hpp +++ b/src/slave/containerizer/provisioner/docker/registry_client.hpp @@ -87,15 +87,15 @@ public: /** * Factory method for creating RegistryClient objects. * - * @param authServer URL of authorization server. * @param registryServer URL of docker registry server. + * @param authServer URL of authorization server. * @param credentials credentials for client session (optional). * @return RegistryClient on Success. * Error on failure. */ static Try<process::Owned<RegistryClient>> create( - const process::http::URL& authServer, const process::http::URL& registryServer, + const process::http::URL& authServer, const Option<Credentials>& credentials); /** @@ -138,16 +138,16 @@ public: private: RegistryClient( - const process::http::URL& authServer, const process::http::URL& registryServer, + const process::http::URL& authServer, const Option<Credentials>& credentials, const process::Owned<RegistryClientProcess>& process); static const Duration DEFAULT_MANIFEST_TIMEOUT_SECS; static const size_t DEFAULT_MANIFEST_MAXSIZE_BYTES; - const process::http::URL authServer_; const process::http::URL registryServer_; + const process::http::URL authServer_; const Option<Credentials> credentials_; process::Owned<RegistryClientProcess> process_;
