]> git.proxmox.com Git - ceph.git/blob - ceph/src/librbd/api/Group.h
bump version to 12.1.2-pve1
[ceph.git] / ceph / src / librbd / api / Group.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_GROUP_H
5 #define CEPH_LIBRBD_API_GROUP_H
6
7 #include "include/rbd/librbd.hpp"
8 #include <string>
9 #include <vector>
10
11 namespace librados { struct IoCtx; }
12
13 namespace librbd {
14
15 struct ImageCtx;
16
17 namespace api {
18
19 template <typename ImageCtxT = librbd::ImageCtx>
20 struct Group {
21
22 static int create(librados::IoCtx& io_ctx, const char *imgname);
23 static int remove(librados::IoCtx& io_ctx, const char *group_name);
24 static int list(librados::IoCtx& io_ctx, std::vector<std::string> *names);
25
26 static int image_add(librados::IoCtx& group_ioctx, const char *group_name,
27 librados::IoCtx& image_ioctx, const char *image_name);
28 static int image_remove(librados::IoCtx& group_ioctx, const char *group_name,
29 librados::IoCtx& image_ioctx, const char *image_name);
30 static int image_remove_by_id(librados::IoCtx& group_ioctx,
31 const char *group_name,
32 librados::IoCtx& image_ioctx,
33 const char *image_id);
34 static int image_list(librados::IoCtx& group_ioctx, const char *group_name,
35 std::vector<group_image_status_t> *images);
36
37 static int image_get_group(ImageCtxT *ictx, group_spec_t *group_spec);
38
39 };
40
41 } // namespace api
42 } // namespace librbd
43
44 extern template class librbd::api::Group<librbd::ImageCtx>;
45
46 #endif // CEPH_LIBRBD_API_GROUP_H