Forgot to run schema2c.

This commit is contained in:
Adam Ierymenko 2015-04-21 16:50:02 -07:00
parent ddebe2d4c7
commit e4046964f0
2 changed files with 32 additions and 2 deletions

View File

@ -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;
}

View File

@ -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"\