# DCgfs.cfg: Collects Oracle GlassFish Server Information # $Id: DCgfs.cfg,v 1.8 2014/10/07 05:58:14 RDA Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_8/src/scripting/lib/collect/OFM/DCgfs.cfg,v 1.8 2014/10/07 05:58:14 RDA Exp $ # # Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. # # Change history # 20141002 KRA Improve domain validation. ############################################################################### # Collect Oracle GlassFish Server collection setup information ############################################################################### #------------------------------------------------------------------------------ # Module definition #------------------------------------------------------------------------------ col=${B_IN_USE} dsc='Collects Oracle GlassFish Server Information' man='This module supports Sun Java System Application Server (SJSAS) 8.x, 9.x, \ Oracle GlassFish Server 2.0 and later.' pre=RDA:DCbegin rpt=B_IN_USE var=not_used # Flow:in_use,B_IN_USE exe=sdcl { "var @{AUX.var} = cond(${PRF.B_TESTS}, list('in_use'),\ " compare('eq',${GRP.OW.W_WAS},'GFS'),list('in_use'),\ " list('B_IN_USE')) " "macro is_valid_home "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified GlassFish Server home directory does not exist.' " require isAbsolute($dir),\ " 'The specified GlassFish Server home directory is not an \ " absolute path.' " require testFile('f',catFile($dir,'bin',${AS.BATCH:'asadmin'})),\ " 'The specified GlassFish Server home directory does not contain some \ " GlassFish Server installation related-files. Without a valid directory, \ " the collection will be disabled.' " var ${AUX.nam} = $nam " return true "} " "macro check_domain "{loop $dom (findDir($arg[0],'^\.+$','npv')) " {if ?nvl(testDir('d',catDir($dom,'config')),\ " testDir('d',catDir($dom,'logs'))) " return 1 " } " return 0 "} " "macro is_valid_domain "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified GlassFish Server domain root directory does not exist.' " require isAbsolute($dir),\ " 'The specified GlassFish Server domain root directory is not an \ " absolute path.' " require check_domain($dir),\ " 'The specified GlassFish Server domain root directory does not contain \ " some GlassFish Server domain related-files. Without a valid \ " directory, the collection will not contain domain related information.' " var ${AUX.nam} = $nam " return true "} " "macro check_node "{loop $nod (findDir($arg[0],'^[^\.]+$','np')) " {loop $ins (findDir($nod,'^[^\.]+$','np')) " {if ?nvl(testDir('d',catDir($ins,'config')),\ " testDir('d',catDir($ins,'logs'))) " return 1 " } " } " return 0 "} " "macro is_valid_node "{var ($nam,$dir) = @arg " require testDir('d',$dir),\ " 'The specified GlassFish Server node root directory does not exist.' " require isAbsolute($dir),\ " 'The specified GlassFish Server node root directory is not an \ " absolute path.' " require check_node($dir),\ " 'The specified GlassFish Server node root directory does not contain \ " some GlassFish Server node related-files. Without a valid \ " directory, the collection will not contain instance related information.' " var ${AUX.nam} = $nam " return true "} } #------------------------------------------------------------------------------ # Setting definitions #------------------------------------------------------------------------------ [in_use] typ=B dft=true dsc='Is Oracle GlassFish Server in use?' nam=B_IN_USE var=D_HOME [not_used] typ=B dft=false dsc='Is Oracle GlassFish Server in use?' nam=B_IN_USE [B_IN_USE] typ=B dft=${AUX.B_SELECTED} dsc='Is Oracle GlassFish Server in use?' inp='Do you want RDA to collect Oracle GlassFish Server information (Y/N)?' var=true:D_HOME [D_HOME] typ=D dsc='Oracle GlassFish Server home directory' inp='Enter the full path of the Oracle GlassFish Server home directory' nam=- ref=is_valid_home('D_HOME',last) val=W var=exists:D_DOMAIN_ROOT,D_NODE_ROOT,N_THREAD_DUMP,N_THREAD_DUMP_INTERVAL:\ not_used [D_DOMAIN_ROOT] typ=D dft=(catDir(${D_HOME},'glassfish','domains'),\ catDir(${D_HOME},'domains')) dsc='Domain root directory' fmt='<