mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Compare commits
7 Commits
v2.9.0-RC1
...
v2.9.0-RC2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71eefca353 | ||
|
|
1cccd2aa73 | ||
|
|
c5e63ce95b | ||
|
|
ba3607bd87 | ||
|
|
ba526f85a8 | ||
|
|
ecea2a1fb4 | ||
|
|
e2e5687b47 |
@@ -9,7 +9,7 @@ fullnameOverride: ""
|
||||
images:
|
||||
owprov:
|
||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owprov
|
||||
tag: v2.9.0-RC1
|
||||
tag: v2.9.0-RC2
|
||||
pullPolicy: Always
|
||||
# regcred:
|
||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||
|
||||
@@ -2066,19 +2066,12 @@ paths:
|
||||
default: false
|
||||
required: false
|
||||
- in: query
|
||||
description: return the list of devices under RRM
|
||||
description: return the list of devices for a subscriber
|
||||
name: subscriber
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
required: false
|
||||
- in: query
|
||||
description: return RRM settings for a specific device
|
||||
name: rrmSettings
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
required: false
|
||||
- in: query
|
||||
description: return the resolved configuration for a specific device
|
||||
name: resolveConfig
|
||||
@@ -2144,6 +2137,13 @@ paths:
|
||||
type: string
|
||||
format: uuid
|
||||
required: false
|
||||
- in: query
|
||||
description: return RRM settings for a specific device
|
||||
name: rrmSettings
|
||||
schema:
|
||||
type: boolean
|
||||
default: false
|
||||
required: false
|
||||
responses:
|
||||
200:
|
||||
description: Succesful retrieve configuratiopn or part of the configuration
|
||||
@@ -2416,6 +2416,14 @@ paths:
|
||||
type: boolean
|
||||
default: false
|
||||
required: false
|
||||
- in: query
|
||||
description: list venues that use a specific RRM vendor
|
||||
name: RRMvendor
|
||||
schema:
|
||||
type: string
|
||||
example:
|
||||
- this is the shortname of the RRM vendor
|
||||
required: false
|
||||
responses:
|
||||
200:
|
||||
description: Return a list of venues.
|
||||
|
||||
@@ -132,11 +132,10 @@ namespace OpenWifi {
|
||||
if (StorageService()->InventoryDB().GetRecord("serialNumber", SerialNumber_,
|
||||
D)) {
|
||||
if (!D.deviceConfiguration.empty()) {
|
||||
std::cout << "Adding device specific configuration: "
|
||||
<< D.deviceConfiguration.size() << std::endl;
|
||||
// std::cout << "Adding device specific configuration: " << D.deviceConfiguration.size() << std::endl;
|
||||
AddConfiguration(D.deviceConfiguration);
|
||||
} else {
|
||||
std::cout << "No device specific configuration." << std::endl;
|
||||
// std::cout << "No device specific configuration." << std::endl;
|
||||
}
|
||||
if (!D.entity.empty()) {
|
||||
AddEntityConfig(D.entity);
|
||||
@@ -196,8 +195,7 @@ namespace OpenWifi {
|
||||
ReplaceVariablesInObject(OriginalSection, ExpandedSection);
|
||||
Configuration->set(SectionName, ExpandedSection);
|
||||
} else {
|
||||
std::cout << " --- unknown element type --- "
|
||||
<< O->get(SectionName).toString() << std::endl;
|
||||
poco_warning(Logger(), fmt::format("Unknown config element type: {}",O->get(SectionName).toString()));
|
||||
}
|
||||
} else {
|
||||
if (Explain_) {
|
||||
@@ -248,8 +246,7 @@ namespace OpenWifi {
|
||||
"channel",
|
||||
std::strtoull(col.parameterValue.c_str(), nullptr, 10));
|
||||
}
|
||||
std::cout << "Setting channel in radio " << RadioIndex
|
||||
<< std::endl;
|
||||
// std::cout << "Setting channel in radio " << RadioIndex << std::endl;
|
||||
if (Explain_) {
|
||||
Poco::JSON::Object ExObj;
|
||||
ExObj.set("from-name", "overrides");
|
||||
|
||||
@@ -7,5 +7,14 @@
|
||||
#include "StorageService.h"
|
||||
|
||||
namespace OpenWifi {
|
||||
void RESTAPI_venue_list_handler::DoGet() { return ListHandler<VenueDB>("venues", DB_, *this); }
|
||||
void RESTAPI_venue_list_handler::DoGet() {
|
||||
auto RRMvendor = GetParameter("RRMvendor","");
|
||||
if(RRMvendor.empty()) {
|
||||
return ListHandler<VenueDB>("venues", DB_, *this);
|
||||
}
|
||||
VenueDB::RecordVec Venues;
|
||||
auto Where = fmt::format(" deviceRules LIKE '%{}%' ", RRMvendor);
|
||||
DB_.GetRecords(QB_.Offset, QB_.Limit, Venues, Where, " ORDER BY name ");
|
||||
return ReturnObject("venues",Venues);
|
||||
}
|
||||
} // namespace OpenWifi
|
||||
@@ -85,7 +85,7 @@ namespace OpenWifi {
|
||||
ProvObjects::InventoryTag ExistingDevice;
|
||||
auto SerialNumber = Poco::toLower(SerialNumberRaw);
|
||||
if (!GetRecord("serialNumber", SerialNumber, ExistingDevice)) {
|
||||
ProvObjects::InventoryTag NewDevice;
|
||||
ProvObjects::InventoryTag NewDevice;
|
||||
uint64_t Now = Utils::Now();
|
||||
|
||||
auto Tokens = Poco::StringTokenizer(ConnectionInfo, "@:");
|
||||
@@ -127,11 +127,9 @@ namespace OpenWifi {
|
||||
|
||||
if (!FullUUID.empty()) {
|
||||
if (SDK::GW::Device::SetVenue(nullptr, NewDevice.serialNumber, FullUUID)) {
|
||||
// std::cout << "Set GW done " << SerialNumber << std::endl;
|
||||
Logger().information(Poco::format("%s: GW set entity/venue property.",
|
||||
NewDevice.serialNumber));
|
||||
} else {
|
||||
// std::cout << "Could not set GW " << SerialNumber << std::endl;
|
||||
Logger().information(Poco::format(
|
||||
"%s: could not set GW entity/venue property.", NewDevice.serialNumber));
|
||||
}
|
||||
@@ -178,7 +176,7 @@ namespace OpenWifi {
|
||||
|
||||
if (modified) {
|
||||
ExistingDevice.info.modified = Utils::Now();
|
||||
StorageService()->InventoryDB().UpdateRecord("serialNumber", SerialNumber,
|
||||
StorageService()->InventoryDB().UpdateRecord("id", ExistingDevice.info.id,
|
||||
ExistingDevice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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