mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Adding removal subscriber
This commit is contained in:
@@ -37,9 +37,11 @@ namespace OpenWifi{
|
|||||||
|
|
||||||
ProvObjects::InventoryTag Existing;
|
ProvObjects::InventoryTag Existing;
|
||||||
std::string SerialNumber = GetBinding(RESTAPI::Protocol::SERIALNUMBER,"");
|
std::string SerialNumber = GetBinding(RESTAPI::Protocol::SERIALNUMBER,"");
|
||||||
|
Logger().debug(Poco::format("%s: Retrieving inventory information.",SerialNumber));
|
||||||
if(SerialNumber.empty() || !DB_.GetRecord(RESTAPI::Protocol::SERIALNUMBER,SerialNumber,Existing)) {
|
if(SerialNumber.empty() || !DB_.GetRecord(RESTAPI::Protocol::SERIALNUMBER,SerialNumber,Existing)) {
|
||||||
return NotFound();
|
return NotFound();
|
||||||
}
|
}
|
||||||
|
Logger().debug(Poco::format("%s,%s: Retrieving inventory information.", Existing.serialNumber, Existing.info.id ));
|
||||||
|
|
||||||
Poco::JSON::Object Answer;
|
Poco::JSON::Object Answer;
|
||||||
std::string Arg;
|
std::string Arg;
|
||||||
|
|||||||
@@ -328,13 +328,13 @@ namespace OpenWifi::ProvObjects {
|
|||||||
field_to_json( Obj, "geoCode", geoCode);
|
field_to_json( Obj, "geoCode", geoCode);
|
||||||
field_to_json( Obj, "location", location);
|
field_to_json( Obj, "location", location);
|
||||||
field_to_json( Obj, "contact", contact);
|
field_to_json( Obj, "contact", contact);
|
||||||
field_to_json( Obj,"deviceConfiguration",deviceConfiguration);
|
field_to_json( Obj, "deviceConfiguration",deviceConfiguration);
|
||||||
field_to_json( Obj,"rrm",rrm);
|
field_to_json( Obj, "rrm",rrm);
|
||||||
field_to_json( Obj,"managementPolicy",managementPolicy);
|
field_to_json( Obj, "managementPolicy",managementPolicy);
|
||||||
field_to_json( Obj,"state",state);
|
field_to_json( Obj, "state",state);
|
||||||
field_to_json( Obj,"devClass",devClass);
|
field_to_json( Obj, "devClass",devClass);
|
||||||
field_to_json( Obj,"locale",locale);
|
field_to_json( Obj, "locale",locale);
|
||||||
field_to_json( Obj,"realMacAddress",realMacAddress);
|
field_to_json( Obj, "realMacAddress",realMacAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
@@ -345,7 +345,7 @@ namespace OpenWifi::ProvObjects {
|
|||||||
field_from_json( Obj,"entity",entity);
|
field_from_json( Obj,"entity",entity);
|
||||||
field_from_json( Obj,"subscriber",subscriber);
|
field_from_json( Obj,"subscriber",subscriber);
|
||||||
field_from_json( Obj,"deviceType",deviceType);
|
field_from_json( Obj,"deviceType",deviceType);
|
||||||
field_from_json( Obj, "qrCode", qrCode);
|
field_from_json( Obj,"qrCode", qrCode);
|
||||||
field_from_json( Obj,"geoCode",geoCode);
|
field_from_json( Obj,"geoCode",geoCode);
|
||||||
field_from_json( Obj,"location",location);
|
field_from_json( Obj,"location",location);
|
||||||
field_from_json( Obj,"contact",contact);
|
field_from_json( Obj,"contact",contact);
|
||||||
@@ -356,7 +356,6 @@ namespace OpenWifi::ProvObjects {
|
|||||||
field_from_json( Obj,"devClass",devClass);
|
field_from_json( Obj,"devClass",devClass);
|
||||||
field_from_json( Obj,"locale",locale);
|
field_from_json( Obj,"locale",locale);
|
||||||
field_from_json( Obj,"realMacAddress",realMacAddress);
|
field_from_json( Obj,"realMacAddress",realMacAddress);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user