mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +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) {
|
||||
ProvObjects::Venue 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);
|
||||
std::copy(LowerDevs.begin(), LowerDevs.end(), std::back_inserter(R));
|
||||
}
|
||||
|
||||
@@ -499,6 +499,14 @@ listvenues() {
|
||||
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
|
||||
case "$1" in
|
||||
"login") login; echo "You are logged in..." ; logout ;;
|
||||
@@ -546,6 +554,7 @@ case "$1" in
|
||||
"getsignup") login; getsignup $2; logout;;
|
||||
"getsubdevs") login; getsubdevs $2; logout;;
|
||||
"listvenues") login; listvenues $2; logout;;
|
||||
"getvenuedevices") login; getvenuedevices $2; logout;;
|
||||
*) help ;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user