- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-27-2018 02:20 PM
For scripting purpose I need to be able to set egress-max values in QoS with the API.
First I created a QoS profile, TRUST-QOS, and set the egress-max to 20
In powershell, I have the following:
$paURL = "https://" + $PAIP + "//api/?key=" + $apiKey + "&type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdomain']/network/qos/profile/entry[@name='TRUST-QOS']/aggregate-bandwidth/egress-max&element=<egress-max>30</egress-max>" Invoke-WebRequest -uri $panURL
This is supposed to set the value to 30. The reply I get is :
set failed, may need to override template object first
This Palo Alto is new (it's a VM), not yet licenced or connected to a Panorama.
However I can set the value in the GUI or on the CLI with :
set network qos profile TRUST-QOS aggregate-bandwidth egress-max 30
Overrides are for templates but as this is not connected to a panorama and has no template.
Any idea why I get this message with the API? I am able to do many other configurations with the API.
thanks.
09-27-2018 11:05 PM
Solved this with
action=edit
instead of
action=set
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!