7 Replies Latest reply on Mar 25, 2011 11:18 AM by DavidRickard

    How do i add a valid response for "Device.CLI.Send"

      I'm using Device.CLI.Send commands to build a F5 UCS archive and SFTP it off the F5 box. I finally got everything working but I'm getting errors "Did not receive expected response" for when the prompt changes during the SFTP session.  The Device.CLI.Send commands help file states:  4. Enter the specified commands in  sequence and wait for a valid response

      So I'm looking for how to update the list of valid responses so my SFTP session does not give me false errors.  Thanks!

      Device Type = Linux.RedHat.Bash

      rm -f /*.ucs
      bigpipe config save /%ctDeviceName-backup_`date +%m_%d_%y`.ucs
      sftp username@ip-address
      ******** <- pass removed
      put /*.ucs
      quit
      exit

      I originally tried Device Type = F5.BigIP but my output file wasn't recording the full session and it was reporting errors but not showing me what lines were giving me errors.  Linux.RedHat.Bash is giving me better results.

        • Re: How do i add a valid response for "Device.CLI.Send"
          christineb

          Hi Mgramlic - Handling of prompt changes is normally something we need to do specifically within the device script.  It is not a customizable property.

          I'm sorry to say, but at present we don’t support the F5 UCS (see:  Backing up F5 BIGIP UCS archive). We'll need to write a new script for you, and we're already tracking it as a feature request. I'll add another vote - typically we roll a bunch of new scripts out with every release. 

          --Christine

          • Re: How do i add a valid response for "Device.CLI.Send"

            Hi all,

            i've been able to do it, share it :

            create a sript in /home/<username>/ftpput.sh
            for exemple

            ---
            #!/bin/bash
            ftp -n <Ftp server  IP> << END_FTP
            quote USER $1
            quote PASS $2
            cd /<whateverUwant>
            binary
            put $3 $4
            quit
            END_FTP
            ---

            Do not forget de get the script executable
            # chmod u+x /home/<username>/ftpput.sh

            And here we are, in the device.CLI.Send activity options for some Linux.RedHat.Bash devices:

            ---
            bigpipe config save %ctDeviceName
            /home/<username>/ftpput.sh <user> <passwd> /var/local/ucs/%ctDeviceName.ucs %ctDeviceName

            hope it 'll help, that worked for me.

            thx to mgramlic for device type Linux.RedHat.Bash
            Voila,
            Cédric.

            1 of 1 people found this helpful