From: Yehuda Sadeh Date: Wed, 22 Nov 2017 23:49:32 +0000 (-0800) Subject: cls/otp: client api to set multiple keys X-Git-Tag: v13.1.0~343^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0bf1fab7314abb20194d79bf666908e47fe3e775;p=ceph.git cls/otp: client api to set multiple keys Signed-off-by: Yehuda Sadeh --- diff --git a/src/cls/otp/cls_otp_client.cc b/src/cls/otp/cls_otp_client.cc index 484b10310f0d..3798cbe1b2ec 100644 --- a/src/cls/otp/cls_otp_client.cc +++ b/src/cls/otp/cls_otp_client.cc @@ -37,6 +37,15 @@ namespace rados { rados_op->exec("otp", "otp_set", in); } + void OTP::set(librados::ObjectWriteOperation *rados_op, + const list& entries) { + cls_otp_set_otp_op op; + op.entries = entries; + bufferlist in; + ::encode(op, in); + rados_op->exec("otp", "otp_set", in); + } + void OTP::remove(librados::ObjectWriteOperation *rados_op, const string& id) { cls_otp_remove_otp_op op; diff --git a/src/cls/otp/cls_otp_client.h b/src/cls/otp/cls_otp_client.h index 6c34684f8189..262c3c7ece0a 100644 --- a/src/cls/otp/cls_otp_client.h +++ b/src/cls/otp/cls_otp_client.h @@ -17,7 +17,8 @@ namespace rados { class OTP { public: - static void create(librados::ObjectWriteOperation *op, const otp_info_t& config); + static void create(librados::ObjectWriteOperation *op, const otp_info_t& config); + static void set(librados::ObjectWriteOperation *op, const list& entries); static void remove(librados::ObjectWriteOperation *op, const string& id); static int get(librados::IoCtx& ioctx, const string& oid, const list *ids, bool get_all, list *result);