summaryrefslogtreecommitdiff
path: root/service/ControlPlane.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-16 13:42:53 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-16 13:42:53 -0700
commit0bb92715f4f25cce00abeead44f07ba17ff7a529 (patch)
treeade1c297b52ad9f69fccbeef8a753d0ea40e76d4 /service/ControlPlane.cpp
parent78769900a910326d799a581cc914ba282b59de25 (diff)
downloadinfinitytier-0bb92715f4f25cce00abeead44f07ba17ff7a529.tar.gz
infinitytier-0bb92715f4f25cce00abeead44f07ba17ff7a529.zip
DELETE function in network controller JSON API, and a newIdentity convenience request in ControlPlane for scripted testing.
Diffstat (limited to 'service/ControlPlane.cpp')
-rw-r--r--service/ControlPlane.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp
index 9173e483..69c5d48d 100644
--- a/service/ControlPlane.cpp
+++ b/service/ControlPlane.cpp
@@ -435,6 +435,14 @@ unsigned int ControlPlane::handleRequest(
} // else 404
_node->freeQueryResult((void *)pl);
} else scode = 500;
+ } else if (ps[0] == "newIdentity") {
+ // Return a newly generated ZeroTier identity -- this is primarily for debugging
+ // and testing to make it easy for automated test scripts to generate test IDs.
+ Identity newid;
+ newid.generate();
+ responseBody = newid.toString(true);
+ responseContentType = "text/plain";
+ scode = 200;
} else {
std::map<std::string,ControlPlaneSubsystem *>::const_iterator ss(_subsystems.find(ps[0]));
if (ss != _subsystems.end())