summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-10 15:14:10 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-10 15:14:10 -0700
commita35fa7ac932ff93c9a9a70ff3f57eea5e6a9b19a (patch)
tree539d5908fffb88dceca95223ddaf5732c55fd2f9 /controller
parentbebe3d7cfa8eef282513448848f2d95caf73eecc (diff)
downloadinfinitytier-a35fa7ac932ff93c9a9a70ff3f57eea5e6a9b19a.tar.gz
infinitytier-a35fa7ac932ff93c9a9a70ff3f57eea5e6a9b19a.zip
Add expansion of netconf in _test field.
Diffstat (limited to 'controller')
-rw-r--r--controller/SqliteNetworkController.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp
index 0905c99f..7098a027 100644
--- a/controller/SqliteNetworkController.cpp
+++ b/controller/SqliteNetworkController.cpp
@@ -1007,7 +1007,18 @@ unsigned int SqliteNetworkController::_doCPGet(
Utils::snprintf(rcs,sizeof(rcs),"%d,\n",(int)rc);
testFields.append("\t\"_test\": {\n");
testFields.append("\t\t\"resultCode\": "); testFields.append(rcs);
- testFields.append("\t\t\"result\": \""); testFields.append(_jsonEscape(testNetconf.toString().c_str()).c_str()); testFields.append("\"");
+ testFields.append("\t\t\"result\": \""); testFields.append(_jsonEscape(testNetconf.toString().c_str()).c_str()); testFields.append("\",\n");
+ testFields.append("\t\t\"resultJson\": {\n");
+ for(Dictionary::const_iterator i(testNetconf.begin());i!=testNetconf.end();++i) {
+ if (i != testNetconf.begin())
+ testFields.append(",\n");
+ testFields.append("\t\t\t\"");
+ testFields.append(i->first);
+ testFields.append("\": \"");
+ testFields.append(_jsonEscape(i->second.c_str()));
+ testFields.push_back('"');
+ }
+ testFields.append("\n\t\t}\n");
testFields.append("\t}\n");
}
}