X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Ftypes.h;fp=src%2Fceph%2Fsrc%2Ftools%2Frbd_mirror%2Ftypes.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=ba8aa7df1fa6142e02b47a0dadd4ea699cc1d7f1;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/tools/rbd_mirror/types.h b/src/ceph/src/tools/rbd_mirror/types.h deleted file mode 100644 index ba8aa7d..0000000 --- a/src/ceph/src/tools/rbd_mirror/types.h +++ /dev/null @@ -1,97 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_RBD_MIRROR_TYPES_H -#define CEPH_RBD_MIRROR_TYPES_H - -#include -#include -#include -#include -#include - -#include "include/rados/librados.hpp" -#include "include/rbd/librbd.hpp" - -namespace rbd { -namespace mirror { - -typedef shared_ptr RadosRef; -typedef shared_ptr IoCtxRef; -typedef shared_ptr ImageRef; - -struct ImageId { - std::string global_id; - std::string id; - - explicit ImageId(const std::string &global_id) : global_id(global_id) { - } - ImageId(const std::string &global_id, const std::string &id) - : global_id(global_id), id(id) { - } - - inline bool operator==(const ImageId &rhs) const { - return (global_id == rhs.global_id && id == rhs.id); - } - inline bool operator<(const ImageId &rhs) const { - return global_id < rhs.global_id; - } -}; - -std::ostream &operator<<(std::ostream &, const ImageId &image_id); - -typedef std::set ImageIds; - -struct Peer { - std::string peer_uuid; - librados::IoCtx io_ctx; - - Peer() { - } - Peer(const std::string &peer_uuid) : peer_uuid(peer_uuid) { - } - Peer(const std::string &peer_uuid, librados::IoCtx& io_ctx) - : peer_uuid(peer_uuid), io_ctx(io_ctx) { - } - - inline bool operator<(const Peer &rhs) const { - return peer_uuid < rhs.peer_uuid; - } -}; - -typedef std::set Peers; - -struct peer_t { - peer_t() = default; - peer_t(const std::string &uuid, const std::string &cluster_name, - const std::string &client_name) - : uuid(uuid), cluster_name(cluster_name), client_name(client_name) - { - } - peer_t(const librbd::mirror_peer_t &peer) : - uuid(peer.uuid), - cluster_name(peer.cluster_name), - client_name(peer.client_name) - { - } - std::string uuid; - std::string cluster_name; - std::string client_name; - bool operator<(const peer_t &rhs) const { - return this->uuid < rhs.uuid; - } - bool operator()(const peer_t &lhs, const peer_t &rhs) const { - return lhs.uuid < rhs.uuid; - } - bool operator==(const peer_t &rhs) const { - return uuid == rhs.uuid; - } -}; - -std::ostream& operator<<(std::ostream& lhs, const peer_t &peer); - -} // namespace mirror -} // namespace rbd - - -#endif // CEPH_RBD_MIRROR_TYPES_H