- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-17-2014 08:08 AM
Hello, and thanks for whatever help you can provide.
I am trying to create a script that will modify one rule from enable to disable and back again via wget. I created a admin user on the panorama box, created a hash based on that user and password. when I run the script I get the following:
<response status="error" code="13"><msg><line>Could not find schema node for xpath /config/devices/entry[@name='local.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='Dana Test']</line></msg></response>
the wget is below:
wget --no-check-certificate "https://144.35.0.40/api/?type=config&action=set&key=<hash>=&xpath=/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/rulebase/security/rule
s/entry[@name='Dana Test']&element=<disabled>yes</disabled>" --no-http-keep-alive -O output
wget --no-check-certificate "https://144.35.0.40/api/?type=commit&action=all&cmd=<commit-all><shared-policy><device-group>"Edge Firewall"</device-group></shared-policy></commit-all>&key=<hash>=" --no-http-keep-alive -O output
cat output
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!