Signed-off-by: John Spray <john.spray@redhat.com>
<< dendl;
return true;
}
+
cluster_state.set_mgr_map(m);
+
return false;
}
#include "auth/Auth.h"
#include "common/Finisher.h"
#include "common/Timer.h"
+#include "mon/MgrMap.h"
#include "DaemonServer.h"
#include "PyModules.h"
}
f.dump_string("json", json.to_str());
return f.get();
+ } else if (what == "mgr_map") {
+ PyFormatter f;
+ cluster_state.with_mgrmap([&f](const MgrMap &mgr_map) {
+ mgr_map.dump(&f);
+ });
+ return f.get();
} else {
derr << "Python module requested unknown data '" << what << "'" << dendl;
Py_RETURN_NONE;
#include "osdc/Objecter.h"
#include "client/Client.h"
#include "common/LogClient.h"
+#include "mon/MgrMap.h"
#include "DaemonState.h"
#include "ClusterState.h"