Skip to content

Commit

Permalink
messages: Update MMgrReport.h to work without using namespace
Browse files Browse the repository at this point in the history
Signed-off-by: Adam C. Emerson <[email protected]>
  • Loading branch information
adamemerson committed Mar 29, 2019
1 parent 7cecfaf commit b805322
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/messages/MMgrReport.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PerfCounterType
uint8_t priority = PerfCountersBuilder::PRIO_USEFUL;
enum unit_t unit;

void encode(bufferlist &bl) const
void encode(ceph::buffer::list &bl) const
{
// TODO: decide whether to drop the per-type
// encoding here, we could rely on the MgrReport
Expand All @@ -53,7 +53,7 @@ class PerfCounterType
ENCODE_FINISH(bl);
}

void decode(bufferlist::const_iterator &p)
void decode(ceph::buffer::list::const_iterator &p)
{
DECODE_START(3, p);
decode(path, p);
Expand Down Expand Up @@ -93,8 +93,8 @@ class MMgrReport : public MessageInstance<MMgrReport> {

// Decode: iterate over the types we know about, sorted by idx,
// and use the current type's type to decide how to decode
// the next bytes from the bufferlist.
bufferlist packed;
// the next bytes from the ceph::buffer::list.
ceph::buffer::list packed;

std::string daemon_name;
std::string service_name; // optional; otherwise infer from entity type
Expand All @@ -105,12 +105,13 @@ class MMgrReport : public MessageInstance<MMgrReport> {
std::vector<DaemonHealthMetric> daemon_health_metrics;

// encode map<string,map<int32_t,string>> of current config
bufferlist config_bl;
ceph::buffer::list config_bl;

std::map<OSDPerfMetricQuery, OSDPerfMetricReport> osd_perf_metric_reports;

void decode_payload() override
{
using ceph::decode;
auto p = payload.cbegin();
decode(daemon_name, p);
decode(declare_types, p);
Expand Down Expand Up @@ -146,7 +147,7 @@ class MMgrReport : public MessageInstance<MMgrReport> {
}

std::string_view get_type_name() const override { return "mgrreport"; }
void print(ostream& out) const override {
void print(std::ostream& out) const override {
out << get_type_name() << "(";
if (service_name.length()) {
out << service_name;
Expand All @@ -172,4 +173,3 @@ class MMgrReport : public MessageInstance<MMgrReport> {
};

#endif

0 comments on commit b805322

Please sign in to comment.