comments in cli

Reply
L4 Transporter

comments in cli

Hi

 

I have a text file with PANOS command line arguments (set) what character defines a comment line ?

 

is there one ?

L7 Applicator

Re: comments in cli

@Alex_Samad,

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. 

L6 Presenter

Re: comments in cli

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

L4 Transporter

Re: comments in cli

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.

 

 

L0 Member

Re: comments in cli

Did you find an answer? (Comments in CLI file)

L3 Networker

Re: comments in cli

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

L4 Transporter

Re: comments in cli

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

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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 Live Community as a whole!

The Live Community thanks you for your participation!