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:
@@ -147,6 +147,14 @@ getentities() {
|
||||
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() {
|
||||
payload="{ \"name\" : \"$1\",\"entity\" : \"$2\", \"serialNumber\" : \"$1\", \"deviceType\" : \"linksys_ea8300\" }";
|
||||
curl ${FLAGS} -X POST "https://${OWPROV}/api/v1/inventory/1" \
|
||||
@@ -214,6 +222,7 @@ case "$1" in
|
||||
"addtag") login; addtag $2 $3; logout;;
|
||||
"getentities") login; getentities ; logout;;
|
||||
"gettags") login; gettags ; logout;;
|
||||
"gettag") login; gettag $2 ; logout;;
|
||||
"tagcount") login; tagcount ; logout;;
|
||||
"entitycount") login; entitycount ; logout;;
|
||||
"venuecount") login; venuecount ; logout;;
|
||||
|
||||
Reference in New Issue
Block a user