mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 09:42:38 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -85,7 +85,8 @@ namespace OpenWifi {
|
||||
ProvObjects::InventoryTag ExistingDevice;
|
||||
auto SerialNumber = Poco::toLower(SerialNumberRaw);
|
||||
if (!GetRecord("serialNumber", SerialNumber, ExistingDevice)) {
|
||||
ProvObjects::InventoryTag NewDevice;
|
||||
std::cout << __LINE__ << std::endl;
|
||||
ProvObjects::InventoryTag NewDevice;
|
||||
uint64_t Now = Utils::Now();
|
||||
|
||||
auto Tokens = Poco::StringTokenizer(ConnectionInfo, "@:");
|
||||
@@ -113,7 +114,9 @@ namespace OpenWifi {
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << __LINE__ << std::endl;
|
||||
if (CreateRecord(NewDevice)) {
|
||||
std::cout << __LINE__ << std::endl;
|
||||
SerialNumberCache()->AddSerialNumber(SerialNumber, DeviceType);
|
||||
std::string FullUUID;
|
||||
if (!NewDevice.entity.empty()) {
|
||||
@@ -143,6 +146,7 @@ namespace OpenWifi {
|
||||
}
|
||||
} else {
|
||||
// Device already exists, do we need to modify anything?
|
||||
std::cout << __LINE__ << std::endl;
|
||||
bool modified = false;
|
||||
if (ExistingDevice.deviceType != DeviceType) {
|
||||
ExistingDevice.deviceType = DeviceType;
|
||||
@@ -176,10 +180,13 @@ namespace OpenWifi {
|
||||
modified = true;
|
||||
}
|
||||
|
||||
std::cout << __LINE__ << std::endl;
|
||||
if (modified) {
|
||||
ExistingDevice.info.modified = Utils::Now();
|
||||
std::cout << __LINE__ << std::endl;
|
||||
StorageService()->InventoryDB().UpdateRecord("serialNumber", SerialNumber,
|
||||
ExistingDevice);
|
||||
std::cout << __LINE__ << std::endl;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -528,6 +528,14 @@ getvenuedevices() {
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
getvenuesperrrm() {
|
||||
curl ${FLAGS} -X GET "https://${OWPROV}/api/v1/venue?RRMvendor=$1" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${token}" \
|
||||
-H "Accept: application/json" > ${result_file}
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
listrrmalgos() {
|
||||
setrrm
|
||||
curl ${FLAGS} -X GET "http://${OWRRM}/api/v1/algorithms" \
|
||||
@@ -546,6 +554,7 @@ rrmprovider() {
|
||||
jq < ${result_file}
|
||||
}
|
||||
|
||||
|
||||
notifications() {
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
@@ -664,6 +673,7 @@ case "$1" in
|
||||
"deleteoverride") login; deleteoverride "$2"; logout;;
|
||||
"venueupgraderevisions") login; venueupgraderevisions "$2"; logout;;
|
||||
"getsystemconfiguration") login; getsystemconfiguration "$2"; logout;;
|
||||
"getvenuesperrrm") login; getvenuesperrrm "$2"; logout;;
|
||||
*) help ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user