FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
hardware:cisco:index.html [2018/02/05 01:08] kurihara created |
hardware:cisco:index.html [2018/02/14 01:38] kurihara |
||
---|---|---|---|
Line 16: | Line 16: | ||
==== Ref. Remote Shell Commands ==== | ==== Ref. Remote Shell Commands ==== | ||
<sxh bash toolbar: | <sxh bash toolbar: | ||
- | $ echo xx.xx.xx.xx | fab auth.ciscopro -s False -- xxxxxx | + | $ fab -H $HOST auth.ciscopro --set shell=False --no-pty -- show interfaces status |
</ | </ | ||
\\ | \\ | ||
- | ===== netapp.py ===== | + | ===== cisco.py ===== |
- | $FHHOME/ | + | $FHHOME/ |
<sxh python toolbar: | <sxh python toolbar: | ||
Line 29: | Line 29: | ||
from fabric.contrib import files | from fabric.contrib import files | ||
+ | env.eagerly_disconnect = False | ||
FHHOME=os.environ[" | FHHOME=os.environ[" | ||
+ | |||
# | # | ||
Line 37: | Line 39: | ||
# cisco.enable | # cisco.enable | ||
# | # | ||
- | @task(alias=" | + | @task |
def enable(): | def enable(): | ||
try: | try: | ||
Line 45: | Line 47: | ||
# | # | ||
- | #cisco.termleng0 | + | #cisco.term_leng0 |
# | # | ||
@task | @task | ||
Line 54: | Line 56: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | @task | ||
+ | def sh_run(): | ||
+ | """ | ||
+ | run(" | ||
+ | |||
+ | # | ||
+ | # | ||
+ | # | ||
+ | @task | ||
+ | def sh_int_status(): | ||
+ | """ | ||
+ | run(" | ||
</ | </ |
My Sites
SNS
Copyright (c) 2024 FastHandle - IT Operations Examples All Rights Reserved.