This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

NCM Config Change templates - bizarre problem

Hi,

I'm fairly new to NCM, but I'm hoping someone can answer this weird problem I've come across. I've created a config change template to upload files from a local tftp server to a Cisco switch. It works ok, but if I try and upload ANY file with a filename beginning with the letter t  (e.g.test.txt), it fails!   Files such as "abc.txt" or "bcde.txt" or an IOS image bin file are fine, but "text.txt", "toolong.txt" or "tuvw.txt" all fail.

When I click on the link to "show commands in new window", the script has dropped the "t" and inserted a space instead.

The script should say "copy tftp://10.1.1.1/test.txt flash:test.txt" , but says "copy tftp://10.1.1.1 est.txt flash:test.txt"

I've read the thwack article about inserting special characters, but it doesn't really help. Please see attached screenshots and the code below.

Any suggestions would be much appreciated,

Thanks,

Mike

/*
.CHANGE_TEMPLATE_DESCRIPTION
        This is a base change template to act as a starting point for other templates.
.PLATFORM_DESCRIPTION
        Replace with details of the device platform for which the template is being created.

.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 @Var_TFTP
       Enter TFTP server IP Address
.PARAMETER_DESCRIPTION @Var_TFTP
        eg 10.1.1.1
.PARAMETER_LABEL @Var_Sourcefile
        Enter source file name to upload
.PARAMETER_DESCRIPTION @Var_Sourcefile
        e.g test.txt
.PARAMETER_LABEL @Var_Destination
        Enter destination file name on flash
.PARAMETER_DESCRIPTION @Var_Destination
        e.g test.txt
*/

script BaseChangeTemplate(  
                             NCM.Nodes @ContextNode,
                             string @Var_TFTP,
                             string @Var_Sourcefile,
                             string @Var_Destination    )
{
  //TODO - insert details of change template
 
  string @SlashSymbol='/'
  string @String_CLI=@Var_TFTP + @SlashSymbol + @Var_Sourcefile

  //Enter CLI commands
  CLI
  {
     copy tftp://@String_CLI flash:@Var_Destination
  }

}

attachments.zip