mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 18:18:03 +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:
|
images:
|
||||||
owprov:
|
owprov:
|
||||||
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owprov
|
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owprov
|
||||||
tag: v2.9.0-RC1
|
tag: v2.9.0-RC2
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
# regcred:
|
# regcred:
|
||||||
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
|
||||||
|
|||||||
@@ -2066,19 +2066,12 @@ paths:
|
|||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
- in: query
|
- in: query
|
||||||
description: return the list of devices under RRM
|
description: return the list of devices for a subscriber
|
||||||
name: subscriber
|
name: subscriber
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
required: false
|
required: false
|
||||||
- in: query
|
|
||||||
description: return RRM settings for a specific device
|
|
||||||
name: rrmSettings
|
|
||||||
schema:
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
required: false
|
|
||||||
- in: query
|
- in: query
|
||||||
description: return the resolved configuration for a specific device
|
description: return the resolved configuration for a specific device
|
||||||
name: resolveConfig
|
name: resolveConfig
|
||||||
@@ -2144,6 +2137,13 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
required: false
|
required: false
|
||||||
|
- in: query
|
||||||
|
description: return RRM settings for a specific device
|
||||||
|
name: rrmSettings
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Succesful retrieve configuratiopn or part of the configuration
|
description: Succesful retrieve configuratiopn or part of the configuration
|
||||||
@@ -2416,6 +2416,14 @@ paths:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
required: 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:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Return a list of venues.
|
description: Return a list of venues.
|
||||||
|
|||||||
@@ -132,11 +132,10 @@ namespace OpenWifi {
|
|||||||
if (StorageService()->InventoryDB().GetRecord("serialNumber", SerialNumber_,
|
if (StorageService()->InventoryDB().GetRecord("serialNumber", SerialNumber_,
|
||||||
D)) {
|
D)) {
|
||||||
if (!D.deviceConfiguration.empty()) {
|
if (!D.deviceConfiguration.empty()) {
|
||||||
std::cout << "Adding device specific configuration: "
|
// std::cout << "Adding device specific configuration: " << D.deviceConfiguration.size() << std::endl;
|
||||||
<< D.deviceConfiguration.size() << std::endl;
|
|
||||||
AddConfiguration(D.deviceConfiguration);
|
AddConfiguration(D.deviceConfiguration);
|
||||||
} else {
|
} else {
|
||||||
std::cout << "No device specific configuration." << std::endl;
|
// std::cout << "No device specific configuration." << std::endl;
|
||||||
}
|
}
|
||||||
if (!D.entity.empty()) {
|
if (!D.entity.empty()) {
|
||||||
AddEntityConfig(D.entity);
|
AddEntityConfig(D.entity);
|
||||||
@@ -196,8 +195,7 @@ namespace OpenWifi {
|
|||||||
ReplaceVariablesInObject(OriginalSection, ExpandedSection);
|
ReplaceVariablesInObject(OriginalSection, ExpandedSection);
|
||||||
Configuration->set(SectionName, ExpandedSection);
|
Configuration->set(SectionName, ExpandedSection);
|
||||||
} else {
|
} else {
|
||||||
std::cout << " --- unknown element type --- "
|
poco_warning(Logger(), fmt::format("Unknown config element type: {}",O->get(SectionName).toString()));
|
||||||
<< O->get(SectionName).toString() << std::endl;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Explain_) {
|
if (Explain_) {
|
||||||
@@ -248,8 +246,7 @@ namespace OpenWifi {
|
|||||||
"channel",
|
"channel",
|
||||||
std::strtoull(col.parameterValue.c_str(), nullptr, 10));
|
std::strtoull(col.parameterValue.c_str(), nullptr, 10));
|
||||||
}
|
}
|
||||||
std::cout << "Setting channel in radio " << RadioIndex
|
// std::cout << "Setting channel in radio " << RadioIndex << std::endl;
|
||||||
<< std::endl;
|
|
||||||
if (Explain_) {
|
if (Explain_) {
|
||||||
Poco::JSON::Object ExObj;
|
Poco::JSON::Object ExObj;
|
||||||
ExObj.set("from-name", "overrides");
|
ExObj.set("from-name", "overrides");
|
||||||
|
|||||||
@@ -7,5 +7,14 @@
|
|||||||
#include "StorageService.h"
|
#include "StorageService.h"
|
||||||
|
|
||||||
namespace OpenWifi {
|
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
|
} // namespace OpenWifi
|
||||||
@@ -85,7 +85,7 @@ namespace OpenWifi {
|
|||||||
ProvObjects::InventoryTag ExistingDevice;
|
ProvObjects::InventoryTag ExistingDevice;
|
||||||
auto SerialNumber = Poco::toLower(SerialNumberRaw);
|
auto SerialNumber = Poco::toLower(SerialNumberRaw);
|
||||||
if (!GetRecord("serialNumber", SerialNumber, ExistingDevice)) {
|
if (!GetRecord("serialNumber", SerialNumber, ExistingDevice)) {
|
||||||
ProvObjects::InventoryTag NewDevice;
|
ProvObjects::InventoryTag NewDevice;
|
||||||
uint64_t Now = Utils::Now();
|
uint64_t Now = Utils::Now();
|
||||||
|
|
||||||
auto Tokens = Poco::StringTokenizer(ConnectionInfo, "@:");
|
auto Tokens = Poco::StringTokenizer(ConnectionInfo, "@:");
|
||||||
@@ -127,11 +127,9 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
if (!FullUUID.empty()) {
|
if (!FullUUID.empty()) {
|
||||||
if (SDK::GW::Device::SetVenue(nullptr, NewDevice.serialNumber, FullUUID)) {
|
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.",
|
Logger().information(Poco::format("%s: GW set entity/venue property.",
|
||||||
NewDevice.serialNumber));
|
NewDevice.serialNumber));
|
||||||
} else {
|
} else {
|
||||||
// std::cout << "Could not set GW " << SerialNumber << std::endl;
|
|
||||||
Logger().information(Poco::format(
|
Logger().information(Poco::format(
|
||||||
"%s: could not set GW entity/venue property.", NewDevice.serialNumber));
|
"%s: could not set GW entity/venue property.", NewDevice.serialNumber));
|
||||||
}
|
}
|
||||||
@@ -178,7 +176,7 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
if (modified) {
|
if (modified) {
|
||||||
ExistingDevice.info.modified = Utils::Now();
|
ExistingDevice.info.modified = Utils::Now();
|
||||||
StorageService()->InventoryDB().UpdateRecord("serialNumber", SerialNumber,
|
StorageService()->InventoryDB().UpdateRecord("id", ExistingDevice.info.id,
|
||||||
ExistingDevice);
|
ExistingDevice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -528,6 +528,14 @@ getvenuedevices() {
|
|||||||
jq < ${result_file}
|
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() {
|
listrrmalgos() {
|
||||||
setrrm
|
setrrm
|
||||||
curl ${FLAGS} -X GET "http://${OWRRM}/api/v1/algorithms" \
|
curl ${FLAGS} -X GET "http://${OWRRM}/api/v1/algorithms" \
|
||||||
@@ -546,6 +554,7 @@ rrmprovider() {
|
|||||||
jq < ${result_file}
|
jq < ${result_file}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
notifications() {
|
notifications() {
|
||||||
if [[ -z "$1" ]]
|
if [[ -z "$1" ]]
|
||||||
then
|
then
|
||||||
@@ -664,6 +673,7 @@ case "$1" in
|
|||||||
"deleteoverride") login; deleteoverride "$2"; logout;;
|
"deleteoverride") login; deleteoverride "$2"; logout;;
|
||||||
"venueupgraderevisions") login; venueupgraderevisions "$2"; logout;;
|
"venueupgraderevisions") login; venueupgraderevisions "$2"; logout;;
|
||||||
"getsystemconfiguration") login; getsystemconfiguration "$2"; logout;;
|
"getsystemconfiguration") login; getsystemconfiguration "$2"; logout;;
|
||||||
|
"getvenuesperrrm") login; getvenuesperrrm "$2"; logout;;
|
||||||
*) help ;;
|
*) help ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user