mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 10:12:29 +00:00
Fixing GetRecords
This commit is contained in:
@@ -419,7 +419,7 @@ namespace ORM {
|
|||||||
ComputeRange(Offset, HowMany) ;
|
ComputeRange(Offset, HowMany) ;
|
||||||
std::string St2 = Where.empty() ? ConvertParams(St) : (ConvertParams(St) + " where " + Where) ;
|
std::string St2 = Where.empty() ? ConvertParams(St) : (ConvertParams(St) + " where " + Where) ;
|
||||||
|
|
||||||
// std::cout << "GetRecords: " << St2 << std::endl;
|
std::cout << "GetRecords: " << St2 << std::endl;
|
||||||
|
|
||||||
Select << St2 ,
|
Select << St2 ,
|
||||||
Poco::Data::Keywords::into(RL);
|
Poco::Data::Keywords::into(RL);
|
||||||
|
|||||||
@@ -147,6 +147,14 @@ getentities() {
|
|||||||
jq < ${result_file}
|
jq < ${result_file}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gettag() {
|
||||||
|
curl ${FLAGS} "https://${OWPROV}/api/v1/inventory?entity=$1" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: Bearer ${token}" \
|
||||||
|
-H "accept: application/json" > ${result_file}
|
||||||
|
jq < ${result_file}
|
||||||
|
}
|
||||||
|
|
||||||
addtag() {
|
addtag() {
|
||||||
payload="{ \"name\" : \"$1\",\"entity\" : \"$2\", \"serialNumber\" : \"$1\", \"deviceType\" : \"linksys_ea8300\" }";
|
payload="{ \"name\" : \"$1\",\"entity\" : \"$2\", \"serialNumber\" : \"$1\", \"deviceType\" : \"linksys_ea8300\" }";
|
||||||
curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/inventory/1" \
|
curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/inventory/1" \
|
||||||
@@ -214,6 +222,7 @@ case "$1" in
|
|||||||
"addtag") login; addtag $2 $3; logout;;
|
"addtag") login; addtag $2 $3; logout;;
|
||||||
"getentities") login; getentities ; logout;;
|
"getentities") login; getentities ; logout;;
|
||||||
"gettags") login; gettags ; logout;;
|
"gettags") login; gettags ; logout;;
|
||||||
|
"gettag") login; gettag $2 ; logout;;
|
||||||
"tagcount") login; tagcount ; logout;;
|
"tagcount") login; tagcount ; logout;;
|
||||||
"entitycount") login; entitycount ; logout;;
|
"entitycount") login; entitycount ; logout;;
|
||||||
"venuecount") login; venuecount ; logout;;
|
"venuecount") login; venuecount ; logout;;
|
||||||
|
|||||||
Reference in New Issue
Block a user