}
string *ptier_type = (tier_type_specified ? &tier_type : nullptr);
- zone.tier_config = tier_config_add;
+ for (auto a : tier_config_add) {
+ zone.tier_config.set(a.first, a.second);
+ }
bool *psync_from_all = (sync_from_all_specified ? &sync_from_all : nullptr);
string *predirect_zone = (redirect_zone_set ? &redirect_zone : nullptr);
int RGWAWSSyncModule::create_instance(CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance){
AWSSyncConfig conf;
- conf.s3_endpoint = config["s3_endpoint"]("");
+ conf.s3_endpoint = config["s3_endpoint"];
- string access_key = config["access_key"]("");
- string secret = config["secret"]("");
+ string access_key = config["access_key"];
+ string secret = config["secret"];
conf.key = RGWAccessKey(access_key, secret);
uint32_t num_replicas{0};
void init(CephContext *cct, const JSONFormattable& config) {
- string elastic_endpoint = config.get("endpoint", "");
+ string elastic_endpoint = config["endpoint"];
id = string("elastic:") + elastic_endpoint;
conn.reset(new RGWRESTConn(cct, nullptr, id, { elastic_endpoint }));
- explicit_custom_meta = config.get_bool("explicit_custom_meta", true);
- index_buckets.init(config.get("index_buckets_list", ""), true); /* approve all buckets by default */
- allow_owners.init(config.get("approved_owners_list", ""), true); /* approve all bucket owners by default */
- override_index_path = config.get("override_index_path", "");
- num_shards = config.get_int("num_shards", ES_NUM_SHARDS_DEFAULT);
+ explicit_custom_meta = config["explicit_custom_meta"](true);
+ index_buckets.init(config["index_buckets_list"], true); /* approve all buckets by default */
+ allow_owners.init(config["approved_owners_list"], true); /* approve all bucket owners by default */
+ override_index_path = config["override_index_path"];
+ num_shards = config["num_shards"](ES_NUM_SHARDS_DEFAULT);
if (num_shards < ES_NUM_SHARDS_MIN) {
num_shards = ES_NUM_SHARDS_MIN;
}
- num_replicas = config.get_int("num_replicas", ES_NUM_REPLICAS_DEFAULT);
+ num_replicas = config["num_replicas"](ES_NUM_REPLICAS_DEFAULT);
}
void init_instance(RGWRealm& realm, uint64_t instance_id) {
}
int RGWElasticSyncModule::create_instance(CephContext *cct, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) {
- string endpoint = config["endpoint"]("");
+ string endpoint = config["endpoint"];
instance->reset(new RGWElasticSyncModuleInstance(cct, config));
return 0;
}