- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
03-03-2021 10:50 PM
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.
03-04-2021 09:23 AM
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..
Other discussions:
I hope this helps.
03-04-2021 09:23 AM
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..
Other discussions:
I hope this helps.
03-09-2021 04:28 PM
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.
03-18-2021 08:28 AM
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 feedback—it 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
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!