FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


hardware:junos:index.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hardware:junos:index.html [2018/03/14 01:31]
kurihara
hardware:junos:index.html [2018/03/26 15:32] (current)
kurihara [junos.py]
Line 95: Line 95:
     """save_config:/home/fasthandle/fhhome/tmp/test-fw1"""     """save_config:/home/fasthandle/fhhome/tmp/test-fw1"""
     date = datetime.now().strftime('%Y%m%d_%H%M')     date = datetime.now().strftime('%Y%m%d_%H%M')
-    res=run("show configuration | display set | no-more", shell=False)+    with hide("stdout"): 
 +        res=run("show configuration | display set | no-more", shell=False)
          
     logfile=open("%s_%s" % (file,date) ,"a+")     logfile=open("%s_%s" % (file,date) ,"a+")
     logfile.write(res + "\n")     logfile.write(res + "\n")
     logfile.close()     logfile.close()
 +    
 +    local("ls -lh %s_%s" % (file,date))
  
  


hardware/junos/index.html.1520958679.txt.gz · Last modified: 2018/03/14 01:31 by kurihara