Fabric not fetching full output

asteroid4uasteroid4u Posts: 1

I am trying fabric to fetch few inputs from cisco Nexus switch and output displaying disconnecting with error

error:

  c:\Python27>Scripts\fab.exe -f D:\Python-scripts\nexus-fabric.py conf  -H     10.10.10.10 -u admin
  [10.10.10.10] Executing task 'conf'
  [10.10.10.10] run: terminal length 0
  [10.10.10.10] Login password for 'admin':
  [10.10.10.10] out: gl_set_term_size: NULL arguments(s).
  [10.10.10.10] out:

  [10.10.10.10] run: show interface brief
  [10.10.10.10] out:
  [10.10.10.10] out: -------------------------------------------------------   ------------------------
  [10.10.10.10] out: Interface  Vsan   Admin  Admin   Status          SFP         Oper  Oper   Port
  [10.10.10.10] out:                   Mode   Trunk                            Mode  Speed  Channel
  [10.10.10.10] out:                          Mode                                 (Gbps)
 [10.10.10.10] out: -------------------------------------------------------------------------------
 [10.10.10.10] out: fc2/1      4094   auto   on      sfpAbsent        --     --           --
 [10.10.10.10] out:


 Fatal error: run() received nonzero return code -1 while executing!

 Requested: show interface brief
 Executed: show interface brief

 Aborting.
 Disconnecting from 10.10.10.10... done.

code:

  from fabric.api import run
  def conf():
     run("terminal length 0",shell=False)
     run("show interface brief",shell=False

Please help

Fabric version :

     c:\Python27>Scripts\fab.exe --version
     Fabric 1.13.1
     Paramiko 2.1.2

Python 2.7

please help

Tagged:

Comments

Sign In or Register to comment.