mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 02:02:36 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ namespace OpenWifi{
|
|||||||
for (const auto &i: V.children) {
|
for (const auto &i: V.children) {
|
||||||
ProvObjects::Venue V2;
|
ProvObjects::Venue V2;
|
||||||
if (StorageService()->VenueDB().GetRecord("id", i, V2)) {
|
if (StorageService()->VenueDB().GetRecord("id", i, V2)) {
|
||||||
|
std::copy(V2.devices.begin(),V2.devices.end(),std::back_inserter(R));
|
||||||
auto LowerDevs = GetDevices(V2, GetChildren);
|
auto LowerDevs = GetDevices(V2, GetChildren);
|
||||||
std::copy(LowerDevs.begin(), LowerDevs.end(), std::back_inserter(R));
|
std::copy(LowerDevs.begin(), LowerDevs.end(), std::back_inserter(R));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -499,6 +499,14 @@ listvenues() {
|
|||||||
jq < ${result_file}
|
jq < ${result_file}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getvenuedevices() {
|
||||||
|
curl ${FLAGS} -X GET "https://${OWPROV}/api/v1/venue/$1?getDevices=true&getChildren=true" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer ${token}" \
|
||||||
|
-H "Accept: application/json" > ${result_file}
|
||||||
|
jq < ${result_file}
|
||||||
|
}
|
||||||
|
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"login") login; echo "You are logged in..." ; logout ;;
|
"login") login; echo "You are logged in..." ; logout ;;
|
||||||
@@ -546,6 +554,7 @@ case "$1" in
|
|||||||
"getsignup") login; getsignup $2; logout;;
|
"getsignup") login; getsignup $2; logout;;
|
||||||
"getsubdevs") login; getsubdevs $2; logout;;
|
"getsubdevs") login; getsubdevs $2; logout;;
|
||||||
"listvenues") login; listvenues $2; logout;;
|
"listvenues") login; listvenues $2; logout;;
|
||||||
|
"getvenuedevices") login; getvenuedevices $2; logout;;
|
||||||
*) help ;;
|
*) help ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user