- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-13-2017 07:12 PM
Hi
I have a text file with PANOS command line arguments (set) what character defines a comment line ?
is there one ?
09-14-2017 07:06 AM
Can you explain a little more what you are actually trying to do. To the best of my knowledge there is no character within the cli that dictates a comment. Any script that you are trying to setup would usually have a comment character that simply means it should ignore that line.
09-14-2017 08:32 AM - edited 09-14-2017 08:34 AM
Hi,
It this what you wanted:
# set cli config-output-format set
xxxxxx# show
set deviceconfig system update-server updates.paloaltonetworks.com
set deviceconfig system update-schedule threats recurring daily at 01:15
set deviceconfig system update-schedule threats recurring daily action download-and-install
set deviceconfig system update-schedule global-protect-datafile recurring daily action download-and-install
set deviceconfig system update-schedule global-protect-datafile recurring daily at 01:30
set deviceconfig system update-schedule anti-virus recurring hourly action download-and-install
09-14-2017 06:14 PM
Hi
Sorry. needs better explanation.
So I am using a text file - similar to what i did with cisco / arista. which has lines of config in it. But I was able to use
# or !! to signify that those lines where comments - so I could document desiscions
I would use the text files by simply coping and paste into a cli.
so I might want to have something like this
# set up aggregate port
set template vdc config network interface aggregate-ethernet ae1 layer3 ipv6 neighbor-discovery router-advertisement enable no
set template vdc config network interface aggregate-ethernet ae1 comment "10G PO to core switches"
and I would like to be able to select the whole file and just paste.
with PANOS, the # comes up as an error, which makes it harder for me to quickly scan for errors.
11-06-2019 08:03 PM
Did you find an answer? (Comments in CLI file)
11-07-2019 07:20 AM
Maybe???
Switch to scripting mode. In scripting mode, you can copy and paste commands from a text file directly into the CLI. Although you can do this without scripting-mode enabled (up to 20 lines). If you cut-and-paste a block of text into the CLI, examine the output of the lines you pasted. If you see lines that are truncated or generate errors, you may have to re-paste a smaller section of text, or switch to scripting-mode admin@PA-3060> set cli scripting-mode on
11-14-2019 12:26 PM
Hi
This seems a little silly - unable to allocate a character for comments. makes script files lot better by adding documentation to the script file.
Seems like very basic sort of stuff
A
03-26-2020 09:48 AM
is it possible that the comment would be similar to Juniper (both FreeBSD) and would use the same type of comments found in .xml (see below)
I agree with Alex, seems silly that such a character doesn't exist, but with Palo's constant desire to do everything via GUI I guess that makes some sense.
Palo folks can you please comment and let us know if below syntax is correct?
<!-- this is a comment -->
03-30-2020 10:26 PM
No go...
Unknown command: <!--
09-08-2021 04:07 PM
i agree that a no comment character is a stupid omission on PA's part. common guys, put a comment character like #, ! or something into the config mode in CLI.
04-16-2023 09:48 AM - edited 04-16-2023 09:49 AM
One workaround I found was to just us a benign config stanza, like a tag... e.g:
top set tag comment comments "this is a note about the next few lines of config"
set ...
set ...
and, if you like, follow it with:
top delete tag comment
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!