From 17cfaba384317315c830fedf0a129feaacbf6bf6 Mon Sep 17 00:00:00 2001 From: Abhishek Lekshmanan Date: Thu, 23 Feb 2017 11:12:31 +0100 Subject: [PATCH] rgw: RGWRestConn allow keys to be initialized This allows for other s3 clients to be created, we previously only set the value of S3 system key from rados. Signed-off-by: Abhishek Lekshmanan --- src/rgw/rgw_rest_conn.cc | 4 +++- src/rgw/rgw_rest_conn.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest_conn.cc b/src/rgw/rgw_rest_conn.cc index d087c5a32300..a8871efdd47e 100644 --- a/src/rgw/rgw_rest_conn.cc +++ b/src/rgw/rgw_rest_conn.cc @@ -8,9 +8,11 @@ RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWRados *store, const string& _remote_id, - const list& remote_endpoints) + const list& remote_endpoints, + RGWAccessKey _cred) : cct(_cct), endpoints(remote_endpoints.begin(), remote_endpoints.end()), + key(std::move(_cred)), remote_id(_remote_id) { if (store) { diff --git a/src/rgw/rgw_rest_conn.h b/src/rgw/rgw_rest_conn.h index e9941856f577..32c7e673e86c 100644 --- a/src/rgw/rgw_rest_conn.h +++ b/src/rgw/rgw_rest_conn.h @@ -60,7 +60,8 @@ class RGWRESTConn public: - RGWRESTConn(CephContext *_cct, RGWRados *store, const string& _remote_id, const list& endpoints); + RGWRESTConn(CephContext *_cct, const string& _remote_id, const list& endpoints, RGWAccessKey _cred); + // custom move needed for atomic RGWRESTConn(RGWRESTConn&& other); RGWRESTConn& operator=(RGWRESTConn&& other); -- 2.47.3