#include "messages/PaxosServiceMessage.h"
#include <vector>
-using std::vector;
+#include <string>
class MMonCommand : public PaxosServiceMessage {
public:
uuid_d fsid;
- vector<string> cmd;
+ std::vector<std::string> cmd;
MMonCommand() : PaxosServiceMessage(MSG_MON_COMMAND, 0) {}
MMonCommand(const uuid_d &f)
#include "messages/MMonCommand.h"
#include "common/Formatter.h"
#include "common/TextTable.h"
+#include "common/cmdparse.h"
#include "include/stringify.h"
#define dout_subsys ceph_subsys_mon
bool ConfigMonitor::preprocess_command(MonOpRequestRef op)
{
MMonCommand *m = static_cast<MMonCommand*>(op->get_req());
- stringstream ss;
+ std::stringstream ss;
int err = 0;
- map<string, cmd_vartype> cmdmap;
+ cmdmap_t cmdmap;
if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) {
string rs = ss.str();
mon->reply_command(op, -EINVAL, rs, get_last_committed());
bool ConfigMonitor::prepare_command(MonOpRequestRef op)
{
MMonCommand *m = static_cast<MMonCommand*>(op->get_req());
- stringstream ss;
+ std::stringstream ss;
int err = -EINVAL;
- map<string, cmd_vartype> cmdmap;
+ cmdmap_t cmdmap;
if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) {
string rs = ss.str();
mon->reply_command(op, -EINVAL, rs, get_last_committed());