# MCsans.cfg: Collects information for Storage Area Network (SAN) Switches # $Id: MCsans.cfg,v 1.6 2013/12/20 14:28:03 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/EXPLORER/MCsans.cfg,v 1.6 2013/12/20 14:28:03 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change History # 20131220 JGS Fix spell. ############################################################################### # Setup information for Storage Area Network (SAN) Switches ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ def="COL/${CUR.K_MODULE}.SANS" dsc='Collects Storage Area Network (SAN) Switches Information' var=get_hosts,loop_host exe=sdcl { "if ${RUN.EXPLORER.B_USE_SANS} "{var ${F_CFG:'Current input file'} = ${RUN.EXPLORER.XPLR.SANS.F_CFG} " loop $set (@{N_SET:'Storage Area Network (SAN) switches set'} = \ " @{RUN.EXPLORER.XPLR.SANS.N_SET}) " {var ${T_HOST_${VAR.set}:"Host name or IP address of SAN switch ${VAR.set}"} \ " = ${RUN.EXPLORER.XPLR.SANS.T_HOST_${VAR.set}} " var ${T_TYPE_${VAR.set}:"Switch type for SAN switch ${VAR.set}"} = \ " ${RUN.EXPLORER.XPLR.SANS.T_TYPE_${VAR.set}} " var ${T_USER_${VAR.set}:"User for connecting to SAN switch ${VAR.set}"} = \ " ${RUN.EXPLORER.XPLR.SANS.T_USER_${VAR.set}} " } " var ${AUX.var} = [] "} } #------------------------------------------------------------------------------ # Settings definitions #------------------------------------------------------------------------------ [get_hosts] typ=T dsc='Host names or IP addresses of Storage Area Network (SAN) switch' dup='Duplicate entry' end='.' err='Bad host name or IP address' inp="Enter the host name or IP address of a Storage Area Network (SAN) switch, \ or period (${AUX.end}) to end" nam=-T_TMP_HOSTS ref=isHost(last,true) val=E exe=sdcl { "var @tbl = () "loop $set (@{N_SET}) " call push(@tbl,${T_HOST_${VAR.set}}) "var (@{AUX.dft},@{N_SET:'Storage Area Network (SAN) switches set'}) = @tbl } [loop_host] typ=L dft=@{T_TMP_HOSTS} nam=-T_TMP_HOST var=loop:save_host,save_type,save_user [save_host] typ=T dft=${T_TMP_HOST} dsc="Host name or IP address of Storage Area Network switch ${CNT.SANS_SET}" nam=T_HOST_${CNT.SANS_SET} exe=sdcl { "call push(@{N_SET},${INC.SANS_SET}) } [save_type] typ=T dft=${T_TYPE_${CNT.SANS_SET}} dsc="Switch type for Storage Area Network switch ${CNT.SANS_SET}" err='Use one of the valid switch types (brocade, cisco, mcdata, sanbox1, \ sanbox2)' # stopwords cisco mcdata inp="Enter the switch type for Storage Area Network (SAN) switch ${T_TMP_HOST} \ (brocade, cisco, mcdata, sanbox1, sanbox2)" ref="^(brocade|cisco|mcdata|sanbox[12])$" nam=T_TYPE_${CNT.SANS_SET} val=E [save_user] typ=T dft=${T_USER_${CNT.SANS_SET}} dsc="User for connecting to Storage Area Network switch ${CNT.SANS_SET}" err='Bad user name' inp="Enter the user for connecting to Storage Area Network (SAN) switch \ ${T_TMP_HOST}" ref=isUser(last,true) nam=T_USER_${CNT.SANS_SET} val=E