mgr/PyState.cc
mgr/MgrPyModule.cc
mgr/MgrStandby.cc
- mgr/Mgr.cc)
+ mgr/Mgr.cc
+ mgr/mgr_commands.cc)
add_executable(ceph-mgr ${mgr_srcs}
$<TARGET_OBJECTS:heap_profiler_objs>)
target_include_directories(ceph-mgr PRIVATE "${PYTHON_INCLUDE_DIRS}")
#include "auth/RotatingKeyRing.h"
#include "json_spirit/json_spirit_writer.h"
+#include "mgr/mgr_commands.h"
#include "mon/MonCommand.h"
#include "messages/MMgrOpen.h"
#define dout_prefix *_dout << "mgr.server " << __func__ << " "
-/* The set of statically defined (C++-handled) commands. This
- * does not include the Python-defined commands, which are loaded
- * in PyModules */
-const std::vector<MonCommand> DaemonServer::mgr_commands = {
-#define COMMAND(parsesig, helptext, module, perm, availability) \
- {parsesig, helptext, module, perm, availability, 0},
-#include "MgrCommands.h"
-#undef COMMAND
-};
-
DaemonServer::DaemonServer(MonClient *monc_,
Finisher &finisher_,
void maybe_ready(int32_t osd_id);
public:
- static const std::vector<MonCommand> mgr_commands;
-
int init(uint64_t gid, entity_addr_t client_addr);
void shutdown();
#include "global/signal_handler.h"
#include "mgr/MgrContext.h"
+#include "mgr/mgr_commands.h"
#include "MgrPyModule.h"
#include "DaemonServer.h"
{
Mutex::Locker l(lock);
- std::vector<MonCommand> commands = DaemonServer::mgr_commands;
+ std::vector<MonCommand> commands = mgr_commands;
std::vector<MonCommand> py_commands = py_modules.get_commands();
commands.insert(commands.end(), py_commands.begin(), py_commands.end());
return commands;
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "mgr_commands.h"
+
+/* The set of statically defined (C++-handled) commands. This
+ * does not include the Python-defined commands, which are loaded
+ * in PyModules */
+const std::vector<MonCommand> mgr_commands = {
+#define COMMAND(parsesig, helptext, module, perm, availability) \
+ {parsesig, helptext, module, perm, availability, 0},
+#include "MgrCommands.h"
+#undef COMMAND
+};
--- /dev/null
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
+
+#include "mon/MonCommand.h"
+#include <vector>
+
+extern const std::vector<MonCommand> mgr_commands;