]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/api/PoolMetadata.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / librbd / api / PoolMetadata.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #ifndef CEPH_LIBRBD_API_POOL_METADATA_H
5 #define CEPH_LIBRBD_API_POOL_METADATA_H
6
7 #include "include/buffer_fwd.h"
8 #include "include/rados/librados_fwd.hpp"
9
10 #include <map>
11 #include <string>
12
13 namespace librbd {
14
15 class ImageCtx;
16
17 namespace api {
18
19 template <typename ImageCtxT = librbd::ImageCtx>
20 class PoolMetadata {
21 public:
22 static int get(librados::IoCtx& io_ctx, const std::string &key,
23 std::string *value);
24 static int set(librados::IoCtx& io_ctx, const std::string &key,
25 const std::string &value);
26 static int remove(librados::IoCtx& io_ctx, const std::string &key);
27 static int list(librados::IoCtx& io_ctx, const std::string &start,
28 uint64_t max, std::map<std::string, ceph::bufferlist> *pairs);
29 };
30
31 } // namespace api
32 } // namespace librbd
33
34 extern template class librbd::api::PoolMetadata<librbd::ImageCtx>;
35
36 #endif // CEPH_LIBRBD_API_POOL_METADATA_H