Compare commits

...

7 Commits

Author SHA1 Message Date
TIP Automation User
71eefca353 Chg: update image tag in helm values to v2.9.0-RC2 2023-03-20 16:53:40 +00:00
Stephane Bourque
1cccd2aa73 Merge pull request #88 from Telecominfraproject/main
https://telecominfraproject.atlassian.net/browse/WIFI-12342
2023-03-02 11:30:51 -08:00
stephb9959
c5e63ce95b https://telecominfraproject.atlassian.net/browse/WIFI-12068
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2023-03-02 11:12:46 -08:00
stephb9959
ba3607bd87 https://telecominfraproject.atlassian.net/browse/WIFI-12068
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2023-03-02 09:54:00 -08:00
stephb9959
ba526f85a8 https://telecominfraproject.atlassian.net/browse/WIFI-12068
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2023-03-02 09:16:14 -08:00
stephb9959
ecea2a1fb4 https://telecominfraproject.atlassian.net/browse/WIFI-12068
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2023-03-02 09:10:29 -08:00
stephb9959
e2e5687b47 https://telecominfraproject.atlassian.net/browse/WIFI-12068
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2023-03-01 10:11:06 -08:00
7 changed files with 44 additions and 22 deletions

2
build
View File

@@ -1 +1 @@
19
21

View File

@@ -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

View File

@@ -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.

View File

@@ -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");

View File

@@ -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

View File

@@ -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);
}
}

View File

@@ -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