12 Replies Latest reply on Feb 8, 2017 5:45 AM by brinky

    NCM Config Change templates - bizarre problem



      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:// flash:test.txt" , but says "copy tftp:// 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,




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

      .PARAMETER_LABEL @ContextNode
              NCM Node
              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.
             Enter TFTP server IP Address
      .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
           copy tftp://@String_CLI flash:@Var_Destination