Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Can you make variables in a configuration change template optional?

$
0
0

Here is my current change template that I would like to modify items @Line_2 and @Line_3 as optional parameters. Is there any way to do this?

 

/*

.CHANGE_TEMPLATE_DESCRIPTION

        Issues exactly three lines of command

.PLATFORM_DESCRIPTION

        IOS, AOS

.PARAMETER_LABEL @ContextNode

        NCM Node

.PARAMETER_DESCRIPTION @ContextNode

        The node the template will operate on.  All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.

.PARAMETER_LABEL @Line_1

        Enter the first line of command

.PARAMETER_DESCRIPTION @Line_1

        The first line of command

.PARAMETER_LABEL @Line_2

        Enter the second line of command

.PARAMETER_DESCRIPTION @Line_2

        The second line of command

.PARAMETER_LABEL @Line_3

        Enter the third line of command

.PARAMETER_DESCRIPTION @Line_3

        The third line of command

*/

 

 

script BaseChangeTemplate(  

                             NCM.Nodes @ContextNode,

                             string @Line_1,

                             string @Line_2,

                             string @Line_3)

{

  //Issue commands to the device

  CLI

  {

     configure terminal

     @Line_1

     @Line_2

     @Line_3

  }

}


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>