]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mon/MgrMap.h
update sources to 12.2.2
[ceph.git] / ceph / src / mon / MgrMap.h
index 01ed2515c34a8a811a30feb8b8d5c9f9a90c12fa..1af3a0ee7667e7050cffdb5582fcbf93fdfb13bc 100644 (file)
@@ -77,6 +77,10 @@ public:
   std::set<std::string> modules;
   std::set<std::string> available_modules;
 
+  // Map of module name to URI, indicating services exposed by
+  // running modules on the active mgr daemon.
+  std::map<std::string, std::string> services;
+
   epoch_t get_epoch() const { return epoch; }
   entity_addr_t get_active_addr() const { return active_addr; }
   uint64_t get_active_gid() const { return active_gid; }
@@ -120,7 +124,7 @@ public:
 
   void encode(bufferlist& bl, uint64_t features) const
   {
-    ENCODE_START(2, 1, bl);
+    ENCODE_START(3, 1, bl);
     ::encode(epoch, bl);
     ::encode(active_addr, bl, features);
     ::encode(active_gid, bl);
@@ -129,6 +133,7 @@ public:
     ::encode(standbys, bl);
     ::encode(modules, bl);
     ::encode(available_modules, bl);
+    ::encode(services, bl);
     ENCODE_FINISH(bl);
   }
 
@@ -145,6 +150,9 @@ public:
       ::decode(modules, p);
       ::decode(available_modules, p);
     }
+    if (struct_v >= 3) {
+      ::decode(services, p);
+    }
     DECODE_FINISH(p);
   }
 
@@ -177,6 +185,12 @@ public:
       f->dump_string("module", j);
     }
     f->close_section();
+
+    f->open_object_section("services");
+    for (const auto &i : services) {
+      f->dump_string(i.first.c_str(), i.second);
+    }
+    f->close_section();
   }
 
   static void generate_test_instances(list<MgrMap*> &l) {