# DCocsg.cfg: Collects Oracle Communications Service Gatekeeper Information # $Id: DCocsg.cfg,v 1.1 2014/04/01 14:01:41 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/CGBU/DCocsg.cfg,v 1.1 2014/04/01 14:01:41 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20140317 KRA Initial version. ############################################################################### # Collect Oracle Communications Service Gatekeeper setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Oracle Communications Service Gatekeeper Information' pre=RDA:DCbegin req=+OFM:DCwreq rpt=B_IN_USE trg=+OFM:DCwreq var=not_used # Flow:in_use,B_IN_USE exe=sdcl { "var @{AUX.var} = (cond(${PRF.B_TESTS},'in_use','B_IN_USE')) " "macro is_valid_home "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified Service Gatekeeper home directory does not exist.' " require isAbsolute($dir),\ " 'The specified Service Gatekeeper home directory is not an \ " absolute path.' " require match(getProductName($dir),\ " '^Oracle Communications Services Gatekeeper',true),\ " 'The specified Service Gatekeeper home directory does not contain some \ " Service Gatekeeper installation related-files. Without a valid \ " directory, the collection will be disabled.' " var ${AUX.nam} = $nam " return true "} " "macro is_valid_domain "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified WebLogic Server domain directory does not exist.' " require isAbsolute($dir),\ " 'The specified WebLogic Server domain directory is not an absolute path.' " require grepFile(catFile($dir,'config','config.xml'),\ " '^',scalar(@dir = splitDir($dir)),1) "{loop $srv (findDir(catDir($dir,'servers'),'^[^\.]+$','n')) " {if ?testDir('d',catDir($dir,'servers',$srv,'logs')) " call push(@itm,$srv,$srv) " } " var ${T_TMP_DOM/T} = $nam = pop(@dir) " var @{T_TMP_ITM/T} = @itm " var ${I_DOMAIN:'Target associated with the domain'} = \ " nvl(findItem('DOM','D_DOMAIN_HOME',getShortPath($dir,true)),\ " defineTarget('DOM',{D_DOMAIN_ROOT=>$top = catNative(@dir,''),\ " T_DOMAIN_NAME=>$nam,\ " T_TITLE=>"Domain ${VAR.nam} (in ${VAR.top})"})) " var ${T_TOP_FOCUS:\ " 'Focus areas for Oracle WebLogic Server Middleware collection'} = \ " 'Generic' " var ${T_DOM_FOCUS:\ " 'Focus areas for Oracle WebLogic Server domain collection'} = \ " 'CGBU_OCSG,ExtSnmCfg,MinDomCfg,MinSrvCfg,NodDomCfg,NodDomLog' "} }