Improve output of bond list command

This commit is contained in:
Joseph Henry 2022-09-16 13:43:34 -07:00
parent 718039561e
commit 0797adf223
No known key found for this signature in database
GPG key ID: C45B33FF5EBC9344
5 changed files with 70 additions and 32 deletions

View file

@ -597,16 +597,14 @@ static void _bondToJson(nlohmann::json &pj, SharedPtr<Bond> &bond)
nlohmann::json j;
j["ifname"] = bond->getLink(paths[i])->ifname();
j["path"] = pathStr;
/*
j["alive"] = paths[i]->alive(now,true);
j["bonded"] = paths[i]->bonded();
j["latencyMean"] = paths[i]->latencyMean();
j["latencyVariance"] = paths[i]->latencyVariance();
j["packetLossRatio"] = paths[i]->packetLossRatio();
j["packetErrorRatio"] = paths[i]->packetErrorRatio();
j["givenLinkSpeed"] = 1000;
j["alive"] = paths[i]->alive(now);
j["bonded"] = paths[i]->bonded();
j["givenLinkSpeed"] = paths[i]->givenLinkSpeed();
j["allocation"] = paths[i]->allocation();
*/
pa.push_back(j);
}
pj["links"] = pa;