From: Abhishek Lekshmanan Date: Tue, 21 Feb 2017 10:08:45 +0000 (+0100) Subject: rgw: sync plugin for aws (the humble beginnings!) X-Git-Tag: v13.1.0~270^2~126 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=53b664381a3ab6082eb27b07b8f61a4cc447a2a1;p=ceph.git rgw: sync plugin for aws (the humble beginnings!) Signed-off-by: Abhishek Lekshmanan --- diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 606bdcd72e2bc..772b72c8d57a3 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -75,6 +75,7 @@ set(rgw_a_srcs rgw_data_sync.cc rgw_otp.cc rgw_sync_module.cc + rgw_sync_module_aws.cc rgw_sync_module_es.cc rgw_sync_module_es_rest.cc rgw_sync_module_log.cc diff --git a/src/rgw/rgw_sync_module_aws.cc b/src/rgw/rgw_sync_module_aws.cc new file mode 100644 index 0000000000000..2c94432abb1e1 --- /dev/null +++ b/src/rgw/rgw_sync_module_aws.cc @@ -0,0 +1,21 @@ +#include "rgw_common.h" +#include "rgw_coroutine.h" +#include "rgw_sync_module.h" +#include "rgw_data_sync.h" +#include "rgw_boost_asio_yield.h" +#include "rgw_sync_module_aws.h" +#include "rgw_rest_conn.h" +#include "rgw_cr_rest.h" + +#define dout_subsys ceph_subsys_rgw + +static string aws_object_name(const RGWBucketInfo& bucket_info, const rgw_obj_key&key, bool user_buckets=false){ + string obj_name; + if(!user_buckets){ + obj_name = bucket_info.owner.tenant + bucket_info.owner.id + "/" + bucket_info.bucket.name + "/" + key.name; + } else { + // for future when every tenant gets their own bucket + obj_name = bucket_info.bucket.name + "/" + key.name; + } + return obj_name; +} diff --git a/src/rgw/rgw_sync_module_aws.h b/src/rgw/rgw_sync_module_aws.h new file mode 100644 index 0000000000000..d322e9a2bfe92 --- /dev/null +++ b/src/rgw/rgw_sync_module_aws.h @@ -0,0 +1,13 @@ +#ifndef RGW_SYNC_MODULE_AWS_H +#define RGW_SYNC_MODULE_AWS_H + +#include "rgw_sync_module.h" + +class RGWAWSSyncModule : public RGWSyncModule { + public: + RGWAWSSyncModule() {} + bool supports_data_export() override { return false;} + int create_instance(CephContext *cct, map& config, RGWSyncModuleInstanceRef *instance) override; +}; + +#endif /* RGW_SYNC_MODULE_AWS_H */