| 55 | librados::IoCtx m_io_ctx; |
| 56 | |
| 57 | Options(librados::IoCtx& io_ctx, bool image_apply_only_options) { |
| 58 | m_io_ctx.dup(io_ctx); |
| 59 | m_io_ctx.set_namespace(""); |
| 60 | |
| 61 | CephContext *cct = reinterpret_cast<CephContext *>(m_io_ctx.cct()); |
| 62 | |
| 63 | const std::string rbd_key_prefix("rbd_"); |
| 64 | const std::string rbd_mirror_key_prefix("rbd_mirror_"); |
| 65 | auto& schema = cct->_conf.get_schema(); |
| 66 | for (auto& pair : schema) { |
| 67 | if (!boost::starts_with(pair.first, rbd_key_prefix)) { |
| 68 | continue; |
| 69 | } else if (EXCLUDE_OPTIONS.count(pair.first) != 0) { |
| 70 | continue; |
| 71 | } else if (image_apply_only_options && |
| 72 | EXCLUDE_IMAGE_OPTIONS.count(pair.first) != 0) { |
| 73 | continue; |
| 74 | } else if (image_apply_only_options && |
| 75 | boost::starts_with(pair.first, rbd_mirror_key_prefix)) { |
| 76 | continue; |
| 77 | } |
| 78 | |
| 79 | insert({pair.first, {}}); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | int init() { |
| 84 | CephContext *cct = (CephContext *)m_io_ctx.cct(); |
nothing calls this directly
no test coverage detected