1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2016 John Spray <john.spray@redhat.com>
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
14 #ifndef MGR_CONTEXT_H_
15 #define MGR_CONTEXT_H_
19 #include "common/ceph_json.h"
20 #include "mon/MonClient.h"
31 void run(MonClient *monc, const std::string &command)
33 monc->start_mon_command({command}, {},
34 &outbl, &outs, &cond);
46 class JSONCommand : public Command
49 json_spirit::mValue json_result;
56 bool read_ok = json_spirit::read(
57 outbl.to_str(), json_result);