From ef9459dd304061ac8b7b6eddcd0f4d5558d7cdbb Mon Sep 17 00:00:00 2001 From: Divakar Date: Thu, 22 Jan 2015 03:02:25 -0800 Subject: [PATCH] closes-bug:1351172 While printing Agent config introspect not processing the Delete Marked node adjacencies and printing this node as Delete Marked Config Change-Id: Ic6deb10873c4347034766d05e0cd16f3378beeae --- src/ifmap/ifmap_agent_sandesh.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/ifmap/ifmap_agent_sandesh.cc b/src/ifmap/ifmap_agent_sandesh.cc index f98fd2765be..8c6ef05f488 100644 --- a/src/ifmap/ifmap_agent_sandesh.cc +++ b/src/ifmap/ifmap_agent_sandesh.cc @@ -144,18 +144,20 @@ void xml_parse(pugi::xml_node &node, string &s, int n) { void ShowIFMapAgentTable::MakeNode(string &dst, DBEntryBase *src) { IFMapNode *node = static_cast(src); pugi::xml_document doc; - pugi::xml_node config = doc.append_child("config"); + pugi::xml_node config; + + if (!node->IsDeleted()) { + config = doc.append_child("config"); + } else { + config = doc.append_child("Delete Marked config"); + } node->EncodeNodeDetail(&config); -#if 0 - ostringstream oss; - doc.save(oss); - dst = oss.str(); - //replace(dst.begin(), dst.end(), '<', '"'); - //replace(dst.begin(), dst.end(), '>', '"'); -#else xml_parse(config, dst, 1); -#endif + + if (node->IsDeleted()) { + return; + } // Display its adjacencies dst = dst + "Adjacencies:\n";