I'm writing a script to automate installation of new anti-virus content. The anti-virus content is downloaded from dynamic updates on the palo alto support site.
The problem arises when I try to import the new anti-virus content using the following command:
curl --insecure --form file=@ANTI-VIRUS_CONTENT_FILE "//firewall/api?key=GENERATED_KEY&type=import&category=anti-virus"
The file seems to be uploaded but I can not see it on the firewall and I get the following xml response:
<response status="error" code="17"><msg></msg></response>
I'm running PAN-OS 5.0.4
What am i doing wrong?
Any help would be greatly appreciated
Thanks for the answer. Yes I was trying to import to the device using the target parameter in panorama. I ran a support case on it an Palo Alto told me that it's not possible to use the target parameter with import. Thankfully i was able to solve my problem without needing to import any files. So in the end it wasn't a problem:)
how did you manage to download the content? My script for importing the update are ok. (using plink) But I am searching for a method to download the updates for the PA site.
I used a combination of the perl modules WWW::Mechanize and Mojo::DOM. WWW::Mechanize to log in to the support site and get the page with the link to the content and Mojo::DOM to extract the link using CSS-selectors and then downloaded it using wget. The code is here. It's the downloadContentVersion subroutine that does the job. The code is terribly messy. It was only used for testing. and then i found that it was easier to do it all through panorama and dropped the code. I made my final script available here.
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!