Adding tree import.

This commit is contained in:
stephb9959
2021-09-08 10:26:24 -07:00
parent 2ac9cd8ac1
commit 4bd3d8a38b
2 changed files with 29 additions and 21 deletions

View File

@@ -321,6 +321,16 @@ listconfigs() {
jq < ${result_file}
}
deviceconfig() {
gettag() {
curl ${FLAGS} "https://${OWPROV}/api/v1/inventory/$1?config=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; help ; logout ;;
@@ -332,6 +342,7 @@ case "$1" in
"entitycount") login; entitycount ; logout;;
"tree") login; tree ; logout;;
"importtree") login; importtree $2; logout;;
"deviceconfig") login; deviceconfig $2; logout;;
"addtag") login; addtag $2 $3; logout;;
"unassigntag") login; unassigntag $2; logout;;
"addunassignedtag") login; addunassignedtag $2 ; logout;;