summaryrefslogtreecommitdiff
path: root/service/ControlPlane.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-16 16:09:28 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-05-16 16:09:28 -0700
commita187d290f15ed2191e994852a6778bf4aa0f083b (patch)
treec33f5c43b6b5dec857a5b8670ed570ea56d96b74 /service/ControlPlane.cpp
parent27c5f04d68003774b9a85eb7047c683cbb64f0df (diff)
downloadinfinitytier-a187d290f15ed2191e994852a6778bf4aa0f083b.tar.gz
infinitytier-a187d290f15ed2191e994852a6778bf4aa0f083b.zip
Fixes to control plane, API, eliminate problematic inheritance pattern, and start on a NodeJS class for talking to the network controller.
Diffstat (limited to 'service/ControlPlane.cpp')
-rw-r--r--service/ControlPlane.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/service/ControlPlane.cpp b/service/ControlPlane.cpp
index 69c5d48d..1d9f9b4a 100644
--- a/service/ControlPlane.cpp
+++ b/service/ControlPlane.cpp
@@ -26,7 +26,6 @@
*/
#include "ControlPlane.hpp"
-#include "ControlPlaneSubsystem.hpp"
#include "OneService.hpp"
#include "../version.h"
@@ -34,6 +33,8 @@
#include "../ext/http-parser/http_parser.h"
+#include "../controller/SqliteNetworkController.hpp"
+
#include "../node/InetAddress.hpp"
#include "../node/Node.hpp"
#include "../node/Utils.hpp"
@@ -444,7 +445,7 @@ unsigned int ControlPlane::handleRequest(
responseContentType = "text/plain";
scode = 200;
} else {
- std::map<std::string,ControlPlaneSubsystem *>::const_iterator ss(_subsystems.find(ps[0]));
+ std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
if (ss != _subsystems.end())
scode = ss->second->handleControlPlaneHttpGET(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
else scode = 404;
@@ -477,7 +478,7 @@ unsigned int ControlPlane::handleRequest(
} else scode = 500;
}
} else {
- std::map<std::string,ControlPlaneSubsystem *>::const_iterator ss(_subsystems.find(ps[0]));
+ std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
if (ss != _subsystems.end())
scode = ss->second->handleControlPlaneHttpPOST(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
else scode = 404;
@@ -509,7 +510,7 @@ unsigned int ControlPlane::handleRequest(
_node->freeQueryResult((void *)nws);
} else scode = 500;
} else {
- std::map<std::string,ControlPlaneSubsystem *>::const_iterator ss(_subsystems.find(ps[0]));
+ std::map<std::string,SqliteNetworkController *>::const_iterator ss(_subsystems.find(ps[0]));
if (ss != _subsystems.end())
scode = ss->second->handleControlPlaneHttpDELETE(std::vector<std::string>(ps.begin()+1,ps.end()),urlArgs,headers,body,responseBody,responseContentType);
else scode = 404;