DX NetOps

  • 1.  upload running script error with $RcvData

    Posted Apr 03, 2017 09:49 AM

    Hello!

     

    I am configuring a new NCM family with SSH connection. Everything has been working ok until the upload running script.I have used other script like the HP_Procuve or Cisco NX OS Upload_Script , and the mistake is the same all time.

     

     

    By the message I suppose that the error in the script is in the lines followings which I have promintented in bold. But this part I always have used and never have this mistake

     

     

    $ssh->timeout( $upload_timeout );
      for my $c( @contentData )
         {
             chomp( $c );
              my $RcvData = $ssh->exec( $c );
    if( ( ( "$RcvData" =~ /\s?%\s/ ) &&
                   ( "$RcvData" !~ /% Duplicate remark statement/ ) ) ||
                 ( "$RcvData" =~ /Syntax Error|Script Error/ ) )
             {
                 $msg = "Upload failed on command: '" . $c . "'\n" . $RcvData;
                 $ssh->close();
                 return( 246, $msg );
             }
              #sleep $upload_timeout;
         }
    $msg = "Success";
    $ssh->close();
     return( 0, $msg );

     

     

     

    Anyone have had a similar problem?

     

    Saludos,

     

    Susana



  • 2.  Re: upload running script error with $RcvData

    Posted Apr 04, 2017 04:10 AM

    Hi,

     

    the message indicates that this line is not working:

    for my $c( @contentData )

    try a blank between $c and (

     

    Regards,

    Olaf