Check if handler supports quota, pubsub doesn't.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
virtual int postauth_init() = 0;
virtual int error_handler(int err_no, std::string* error_content);
virtual void dump(const string& code, const string& message) const {}
+
+ virtual bool supports_quota() {
+ return true;
+ }
};
int get_ret() const { return op_ret; }
virtual int init_processing() {
- op_ret = init_quota();
- if (op_ret < 0)
- return op_ret;
+ if (dialect_handler->supports_quota()) {
+ op_ret = init_quota();
+ if (op_ret < 0)
+ return op_ret;
+ }
return 0;
}
class RGWHandler_REST_PSTopic_S3 : public RGWHandler_REST_S3 {
protected:
+ bool supports_quota() override {
+ return false;
+ }
RGWOp *op_get() override {
if (s->init_state.url_bucket.empty()) {
return nullptr;