Adding firmware upgrade automation.

This commit is contained in:
stephb9959
2021-10-04 21:46:24 -07:00
parent 13cae4de6e
commit 8ec72b426a
5 changed files with 165 additions and 5 deletions

View File

@@ -370,6 +370,14 @@ deviceconfig() {
jq < ${result_file}
}
devicefwoptions() {
curl ${FLAGS} "https://${OWPROV}/api/v1/inventory/$1?firmwareOptions=true" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" \
-H "accept: application/json" > ${result_file}
jq < ${result_file}
}
adddeviceconfig() {
payload="{\"deviceConfiguration\" : \"$2\"}";
curl ${FLAGS} -X PUT "https://${OWPROV}/api/v1/inventory/$1" \
@@ -448,6 +456,7 @@ case "$1" in
"tree") login; tree ; logout;;
"importtree") login; importtree $2; logout;;
"deviceconfig") login; deviceconfig "$2"; logout;;
"devicefwoptions") login; devicefwoptions "$2"; logout;;
"addtag") login; addtag "$2"; logout;;
"unassigntag") login; unassigntag $2; logout;;
"addunassignedtag") login; addunassignedtag $2 ; logout;;