mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 02:02:36 +00:00
Adding fetching of the schema from git
This commit is contained in:
@@ -2166,7 +2166,6 @@ namespace OpenWifi {
|
|||||||
auto schema = json::parse(GitSchema);
|
auto schema = json::parse(GitSchema);
|
||||||
Validator_->set_root_schema(schema);
|
Validator_->set_root_schema(schema);
|
||||||
Daemon()->instance()->Log().information("Using uCentral validation schema from GIT.");
|
Daemon()->instance()->Log().information("Using uCentral validation schema from GIT.");
|
||||||
std::cout << "GIT Schema" << std::endl;
|
|
||||||
} else {
|
} else {
|
||||||
std::string FileName{ Daemon()->DataDir() + "/ucentral.schema.json" };
|
std::string FileName{ Daemon()->DataDir() + "/ucentral.schema.json" };
|
||||||
try {
|
try {
|
||||||
@@ -2177,11 +2176,9 @@ namespace OpenWifi {
|
|||||||
auto schema = json::parse(schema_file.str());
|
auto schema = json::parse(schema_file.str());
|
||||||
Validator_->set_root_schema(schema);
|
Validator_->set_root_schema(schema);
|
||||||
Daemon()->instance()->Log().information("Using uCentral validation schema from local file.");
|
Daemon()->instance()->Log().information("Using uCentral validation schema from local file.");
|
||||||
std::cout << "FILE Schema" << std::endl;
|
|
||||||
} catch (const Poco::Exception &E) {
|
} catch (const Poco::Exception &E) {
|
||||||
Validator_->set_root_schema(DefaultUCentralSchema);
|
Validator_->set_root_schema(DefaultUCentralSchema);
|
||||||
Daemon()->instance()->Log().information("Using uCentral validation from built-in default.");
|
Daemon()->instance()->Log().information("Using uCentral validation from built-in default.");
|
||||||
std::cout << "DEFAULT Schema" << std::endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Initialized_ = Working_ = true;
|
Initialized_ = Working_ = true;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"configuration" :
|
"configuration" :
|
||||||
{ "uuid": 1 }
|
{ "uuid": "1" }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user