mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-02 03:27:51 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -295,6 +295,7 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
ProvObjects::DeviceConfiguration Config;
|
ProvObjects::DeviceConfiguration Config;
|
||||||
if(StorageService()->ConfigurationDB().GetRecord("id", UUID, Config)) {
|
if(StorageService()->ConfigurationDB().GetRecord("id", UUID, Config)) {
|
||||||
|
std::cout << "Device configuration from DB" << std::endl;
|
||||||
if(!Config.configuration.empty()) {
|
if(!Config.configuration.empty()) {
|
||||||
if(DeviceTypeMatch(DeviceType_,Config.deviceTypes)) {
|
if(DeviceTypeMatch(DeviceType_,Config.deviceTypes)) {
|
||||||
for(const auto &i:Config.configuration) {
|
for(const auto &i:Config.configuration) {
|
||||||
@@ -311,6 +312,7 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
std::cout << "Device type does match : " << DeviceType_ << std::endl;
|
||||||
Poco::JSON::Object ExObj;
|
Poco::JSON::Object ExObj;
|
||||||
ExObj.set("from-uuid", Config.info.id);
|
ExObj.set("from-uuid", Config.info.id);
|
||||||
ExObj.set("from-name",Config.info.name );
|
ExObj.set("from-name",Config.info.name );
|
||||||
@@ -318,7 +320,11 @@ namespace OpenWifi {
|
|||||||
ExObj.set("reason", "deviceType mismatch");
|
ExObj.set("reason", "deviceType mismatch");
|
||||||
Explanation_.add(ExObj);
|
Explanation_.add(ExObj);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
std::cout << "Device configuration from DB is empty" << std::endl;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
std::cout << "Invalid UUID for Device configuration from DB" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user