X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FPrepareLocalImageRequest.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Fimage_replayer%2FPrepareLocalImageRequest.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=913bfd1c242c23207b4b873b826086e9f37a694e;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/image_replayer/PrepareLocalImageRequest.h b/src/ceph/src/tools/rbd_mirror/image_replayer/PrepareLocalImageRequest.h deleted file mode 100644 index 913bfd1..0000000 --- a/src/ceph/src/tools/rbd_mirror/image_replayer/PrepareLocalImageRequest.h +++ /dev/null @@ -1,92 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef RBD_MIRROR_IMAGE_REPLAYER_PREPARE_LOCAL_IMAGE_REQUEST_H -#define RBD_MIRROR_IMAGE_REPLAYER_PREPARE_LOCAL_IMAGE_REQUEST_H - -#include "include/buffer.h" -#include - -namespace librados { struct IoCtx; } -namespace librbd { struct ImageCtx; } - -struct Context; -struct ContextWQ; - -namespace rbd { -namespace mirror { -namespace image_replayer { - -template -class PrepareLocalImageRequest { -public: - static PrepareLocalImageRequest *create(librados::IoCtx &io_ctx, - const std::string &global_image_id, - std::string *local_image_id, - std::string *tag_owner, - ContextWQ *work_queue, - Context *on_finish) { - return new PrepareLocalImageRequest(io_ctx, global_image_id, local_image_id, - tag_owner, work_queue, on_finish); - } - - PrepareLocalImageRequest(librados::IoCtx &io_ctx, - const std::string &global_image_id, - std::string *local_image_id, - std::string *tag_owner, - ContextWQ *work_queue, - Context *on_finish) - : m_io_ctx(io_ctx), m_global_image_id(global_image_id), - m_local_image_id(local_image_id), m_tag_owner(tag_owner), - m_work_queue(work_queue), m_on_finish(on_finish) { - } - - void send(); - -private: - /** - * @verbatim - * - * - * | - * v - * GET_LOCAL_IMAGE_ID - * | - * v - * GET_MIRROR_STATE - * | - * v - * - - * @endverbatim - */ - - librados::IoCtx &m_io_ctx; - std::string m_global_image_id; - std::string *m_local_image_id; - std::string *m_tag_owner; - ContextWQ *m_work_queue; - Context *m_on_finish; - - bufferlist m_out_bl; - - void get_local_image_id(); - void handle_get_local_image_id(int r); - - void get_mirror_state(); - void handle_get_mirror_state(int r); - - void get_tag_owner(); - void handle_get_tag_owner(int r); - - void finish(int r); - -}; - -} // namespace image_replayer -} // namespace mirror -} // namespace rbd - -extern template class rbd::mirror::image_replayer::PrepareLocalImageRequest; - -#endif // RBD_MIRROR_IMAGE_REPLAYER_PREPARE_LOCAL_IMAGE_REQUEST_H