palo alto cli scripting mode limitation

Announcements

Changes to the LIVEcommunity experience are coming soon... Here's what you need to know.

Reply
ChiragP
L2 Linker

palo alto cli scripting mode limitation

Hi All,

 

Is there any specific restriction to use commands or lines in scripting mode (set cli scripting-mode on)? The restriction, I means, how many set or delete lines/commands I can use. Not sure what's the buffer or bus size to handle if I paste 200 lines at the same time, would it crash?

 

Device - PA 5250

Os version - 9.0.9-h1

 

Thank you. 


Accepted Solutions
jdelio
Community Team Member

Hey there,

This is a great question that has been asked before in different ways. 

When you use the command 

set cli scripting-mode on

It should allow you to post 200 lines without issues. As far as the limitation.. I would have to dig a little further.. but this command is intended to Copy the config and then Paste it in without the traditional CLI responses. And those configs can be thousands of lines.

 

Please also see the following DotW (Discussion of the Week) that was posted about the CLI, (although missing pictures) it helps answer this question.. and then links off to other discussions also.. 

https://live.paloaltonetworks.com/t5/featured-articles/dotw-loading-a-full-configuration-through-the...

 

Other discussions:

https://live.paloaltonetworks.com/t5/general-topics/increase-paste-buffer-on-pan-or-other-import-met...

 

https://live.paloaltonetworks.com/t5/general-topics/run-multiple-local-script-commands-in-cli/m-p/37...

 

I hope this helps.

 

 

LIVEcommunity team member
Stay Secure,
Joe
Don't forget to Like items!

View solution in original post


All Replies
jdelio
Community Team Member

Hey there,

This is a great question that has been asked before in different ways. 

When you use the command 

set cli scripting-mode on

It should allow you to post 200 lines without issues. As far as the limitation.. I would have to dig a little further.. but this command is intended to Copy the config and then Paste it in without the traditional CLI responses. And those configs can be thousands of lines.

 

Please also see the following DotW (Discussion of the Week) that was posted about the CLI, (although missing pictures) it helps answer this question.. and then links off to other discussions also.. 

https://live.paloaltonetworks.com/t5/featured-articles/dotw-loading-a-full-configuration-through-the...

 

Other discussions:

https://live.paloaltonetworks.com/t5/general-topics/increase-paste-buffer-on-pan-or-other-import-met...

 

https://live.paloaltonetworks.com/t5/general-topics/run-multiple-local-script-commands-in-cli/m-p/37...

 

I hope this helps.

 

 

LIVEcommunity team member
Stay Secure,
Joe
Don't forget to Like items!

View solution in original post

ChiragP
L2 Linker

Hi Jdelio,

 

Thanks for the reply. 

 

I did paste 200 lines without any issue. "set cli scripting-mode on" makes easy. Thanks palo/dev team for developing this command. 

 

I don't have permission to access https://live.paloaltonetworks.com/t5/featured-articles/dotw-loading-a-full-configuration-through-the...

 

If we know the limitation for set cli scripting-mode on that would be great.

jdelio
Community Team Member

@ChiragP 

I am so sorry.. I didn't notice that article was archived.. so you will not be able to access it, I am sorry.. 

But I have copied the bulk of it.. and here it is:

 

"

When performing this kind of operation, the easiest way to get a good bearing on the configuration we're about to deploy is to resort to a comfortable text editor that allows us to easily scroll, highlight, and wrangle the multitude of lines into something comprehensible and accurate. Some text editors may add unexpected and invisible line breaks or formatting that could cause issues when importing the configuration. Of course, invisible formatting can result in error messages and some work in finding lines that need to be repaired, so the copy/paste operation will work.

 

For normal administrative operations, the CLI is set to interact with the administrator and provide feedbackit will not correct any commands and will output error messages if a command is incorrect, even if the command itself is accurate but invisible line breaks are present. To allow a long list of set commands to be submitted without worrying about line breaks, enable scripting mode.

 

> set cli scripting-mode on

 

Scripting mode suppresses any special characters used for formatting when accepting input from the CLI and also stops interacting with the administrator's commands (it will no longer try to autocomplete commands). This prevents error messages from appearing, and prevents the entire paste function from failing if one line has incorrect formatting or unsupported characters.

"

 

Again, as far as limitations.. I think this removes any limitations that would normally be there without this command.

 

Kind regards,

Joe

LIVEcommunity team member
Stay Secure,
Joe
Don't forget to Like items!
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 LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!