diff options
author | Casey Bodley <cbodley@redhat.com> | 2015-10-21 15:40:01 +0200 |
---|---|---|
committer | Yehuda Sadeh <yehuda@redhat.com> | 2016-02-12 01:13:20 +0100 |
commit | 7623e43709c4dbd649e0c25cff29c39cca3be68c (patch) | |
tree | 863fd63a5966da775294a70804d22e43c8da9459 /src | |
parent | rgw: move period Ops to rgw_rest_realm.cc (diff) | |
download | ceph-7623e43709c4dbd649e0c25cff29c39cca3be68c.tar.xz ceph-7623e43709c4dbd649e0c25cff29c39cca3be68c.zip |
rgw: add realm params to period pull
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/rgw/rgw_admin.cc | 4 | ||||
-rw-r--r-- | src/rgw/rgw_rest_realm.cc | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index c00fc691020..fdec1d8ddc7 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2997,6 +2997,10 @@ int main(int argc, char **argv) info.request_uri = "/admin/realm/period"; map<string, string> ¶ms = info.args.get_params(); + if (!realm_id.empty()) + params["realm_id"] = realm_id; + if (!realm_name.empty()) + params["realm_name"] = realm_name; if (!period_id.empty()) params["period_id"] = period_id; if (!period_epoch.empty()) diff --git a/src/rgw/rgw_rest_realm.cc b/src/rgw/rgw_rest_realm.cc index 1749417301c..6dbdac2b718 100644 --- a/src/rgw/rgw_rest_realm.cc +++ b/src/rgw/rgw_rest_realm.cc @@ -39,15 +39,17 @@ class RGWOp_Period_Get : public RGWOp_Period_Base { void RGWOp_Period_Get::execute() { - string period_id; + string realm_id, realm_name, period_id; epoch_t epoch = 0; + RESTArgs::get_string(s, "realm_id", realm_id, &realm_id); + RESTArgs::get_string(s, "realm_name", realm_name, &realm_name); RESTArgs::get_string(s, "period_id", period_id, &period_id); RESTArgs::get_uint32(s, "epoch", 0, &epoch); period.set_id(period_id); period.set_epoch(epoch); - http_ret = period.init(store->ctx(), store); + http_ret = period.init(store->ctx(), store, realm_id, realm_name); if (http_ret < 0) ldout(store->ctx(), 5) << "failed to read period" << dendl; } |