sz180001:root@/qhapp/saninfo>cat sanswlist
172.16.0.54 username password MEM1 MEM2
172.16.0.55 username password MEM1 MEM2
2.脚本如下,修改后缀为.py
sanswop.txt
3.功能及帮助如下:
sz180001:root@/home/mwadmin>sanswop.py -h
Usage:
sanswop.py -t [run|getallinfo|chkwwninfo|chkali|chkzone|createali|delali|createzone|delzone|chkab] [-w wwninfo|wwnlistfile] [-d NUM] [ -i swip ] [ -c cmd ] [ -k keyword ]
Example: sanswop.py -t getallinfo
Example: sanswop.py -t chkali -k keyword #keyword could be wwn or alias , fuzzy search is supported
Example: sanswop.py -t chkzone -k keyword #keyword could be wwn or alias , fuzzy search is supported
Example: sanswop.py -t chkwwninfo -w wwninfo
Example: sanswop.py -t chkwwninfo -w wwninfo -d 0
Example: sanswop.py -t chkwwninfo -w wwnlistfile(1 wwn perline in wwnlistfile.)
Example: sanswop.py -t run -i swip -c switchshow
Example: sanswop.py -t createzone
Example: sanswop.py -t delzone
Example: sanswop.py -t createali
Example: sanswop.py -t delali #invalid function now ,just waiting ....
Example: sanswop.py -t chkab #check invalid zone,invalid ali ,online without ali.
Description: sanswitch operate tools.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-t OPTYPE getallinfo:get all switch info;chkwwninfo:get wwns info...
-w WWNINFO wwninfo or wwn listfile
-d BEFOREDAYS 0 for realtime info;1 for 1 days ago info;default is 1.
-i SWIP Target san switch ip.
-k CHKKEYWORD keyword for check wwn info & zone info.
-c CMD command info
sz180001:root@/home/mwadmin>