summaryrefslogtreecommitdiffstats
path: root/src/tools/rbd_mirror/Types.cc
blob: cd71c73b1cc69e76db6755238a65e85a1f69b6e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab

#include "tools/rbd_mirror/Types.h"

namespace rbd {
namespace mirror {

std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
  return os << "global id=" << image_id.global_id << ", "
            << "id=" << image_id.id;
}

std::ostream& operator<<(std::ostream& lhs,
                         const LocalPoolMeta& rhs) {
  return lhs << "mirror_uuid=" << rhs.mirror_uuid;
}

std::ostream& operator<<(std::ostream& lhs,
                         const RemotePoolMeta& rhs) {
  return lhs << "mirror_uuid=" << rhs.mirror_uuid << ", "
                "mirror_peer_uuid=" << rhs.mirror_peer_uuid;
}

std::ostream& operator<<(std::ostream& lhs, const PeerSpec &peer) {
  return lhs << "uuid: " << peer.uuid
	     << " cluster: " << peer.cluster_name
	     << " client: " << peer.client_name;
}

} // namespace mirror
} // namespace rbd