diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-21 16:50:02 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-21 16:50:02 -0700 |
commit | e4046964f0d8e7ad64a2977cad18b24557fc2251 (patch) | |
tree | 5b73629d99cbcf2ab81a60a0a68cfa7c22b4692d | |
parent | ddebe2d4c7fa4220d2cfad3693edfb15bf7a737c (diff) | |
download | infinitytier-e4046964f0d8e7ad64a2977cad18b24557fc2251.tar.gz infinitytier-e4046964f0d8e7ad64a2977cad18b24557fc2251.zip |
Forgot to run schema2c.
-rw-r--r-- | controller/SqliteNetworkController.cpp | 29 | ||||
-rw-r--r-- | controller/schema.sql.c | 5 |
2 files changed, 32 insertions, 2 deletions
diff --git a/controller/SqliteNetworkController.cpp b/controller/SqliteNetworkController.cpp index 5dc05569..9bb1fa41 100644 --- a/controller/SqliteNetworkController.cpp +++ b/controller/SqliteNetworkController.cpp @@ -776,7 +776,7 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpGET( return 200; } // else 404 - } + } // else 404 return 404; } @@ -793,6 +793,33 @@ unsigned int SqliteNetworkController::handleControlPlaneHttpPOST( return 404; Mutex::Lock _l(_lock); + if (path[0] == "network") { + + if ((path.size() >= 2)&&(path[1].length() == 16)) { + uint64_t nwid = Utils::hexStrToU64(path[1].c_str()); + char nwids[24]; + Utils::snprintf(nwids,sizeof(nwids),"%.16llx",(unsigned long long)nwid); + + if (path.size() >= 3) { + if ((path.size() == 4)&&(path[2] == "member")&&(path[3].length() == 10)) { + uint64_t address = Utils::hexStrToU64(path[3].c_str()); + char addrs[24]; + Utils::snprintf(addrs,sizeof(addrs),"%.10llx",address); + + } else if (path[2] == "rule") { + + + } else if (path[2] == "ipAssignmentPool") { + + } // else 404 + } else { + + } + + } // else 404 + + } // else 404 + return 404; } diff --git a/controller/schema.sql.c b/controller/schema.sql.c index a5d46973..1161451b 100644 --- a/controller/schema.sql.c +++ b/controller/schema.sql.c @@ -72,9 +72,11 @@ "CREATE TABLE Relay (\n"\ " networkId char(16) NOT NULL,\n"\ " nodeId char(10) NOT NULL,\n"\ -" address varchar(64) NOT NULL\n"\ +" phyAddress varchar(64) NOT NULL\n"\ ");\n"\ "\n"\ +"CREATE INDEX Relay_networkId ON Relay (networkId);\n"\ +"\n"\ "CREATE UNIQUE INDEX Relay_networkId_nodeId ON Relay (networkId, nodeId);\n"\ "\n"\ "CREATE TABLE Node (\n"\ @@ -87,6 +89,7 @@ "\n"\ "CREATE TABLE Rule (\n"\ " networkId char(16) NOT NULL,\n"\ +" ordering integer NOT NULL DEFAULT(0),\n"\ " nodeId char(10),\n"\ " vlanId integer,\n"\ " vlanPcp integer,\n"\ |