# S378OSB.def: Collects Oracle Service Bus Information # $Id: S378OSB.def,v 1.11 2012/01/03 13:34:46 mschenke Exp $ # ARCS: $Header: /home/cvs/cvs/RDA_4/src/scripting/lib/modules/S378OSB.def,v 1.11 2012/01/03 13:34:46 mschenke Exp $ # # Change History # 20120103 MSC Change the copyright notice. =head1 NAME S378OSB - Collects Oracle Service Bus Information =head1 DESCRIPTION This module collects Oracle Service Bus-related information. The following reports can be generated and are regrouped under C: =head1 REPORTS =cut echo tput('bold'),'Processing OSB module ...',tput('off') # Initialization var $OSB_HOME = getSetting('OSB_HOME','') var $TOC = '%TOC%' var $TOP = '[[#Top][Back to top]]' pretoc '1:Oracle Service Bus' # Load the common macros run INSTinfo() run WLSlib() =head2 product_info - Product Information Gathers the product information when it is available. =cut if testDir('d',catDir($OSB_HOME,'inventory')) {debug ' Inside OSB module, processing Product Information (can take time)' report product_info prefix {write '---+!! Oracle Service Bus Home Product Information' write $TOC } call inventory_details(lastDir(),true) if isCreated(true) toc '2:[[',getFile(),'][rda_report][Product Information]]' =head2 Manifest Information Gathers the Oracle home manifest information. =cut debug ' Inside OSB module, getting Oracle home manifest information \ (can take time)' pretoc '2:Manifest Information' call dsp_manifest(3,$OSB_HOME) unpretoc } =head2 patch_list - Patch Applied Using Smart Update Lists the Oracle Service Bus patches applied using Smart Update, when available. =cut if and(getSetting('OSB_RUN_BSU'),\ testDir('dr',catDir($OSB_HOME,upDir(),'utils','bsu'))) {debug ' Inside OSB module, gathering patches applied using Smart Update' report patch_list prefix write '---+ Patches Applied Using Smart Update' var $dir = lastDir() var $opt = concat(' -view -status=applied -prod_dir=',\ getNativePath($OSB_HOME)) if or(isCygwin(),isWindows()) {write '---## Using: ',concat(catFile($dir,'bsu.cmd'),$opt) var $job = createTemp('PCH','.bat',true) call writeTemp('PCH','@echo off') call writeTemp('PCH','cd /d "',getNativePath($dir),'"') call writeTemp('PCH','bsu.cmd',$opt) call closeTemp('PCH') call writeCommand(quote($job,'x')) call unlinkTemp('PCH') } elsif isUnix() {write '---## Using: ',concat(catFile($dir,'bsu.sh'),$opt) var $job = createTemp('PCH','.sh',true) call writeTemp('PCH','cd "',$dir,'"') call writeTemp('PCH','bsu.sh',$opt) call closeTemp('PCH') call writeCommand(quote($job,'x')) call unlinkTemp('PCH') } if isCreated(true) toc '2:[[',getFile(),'][rda_report][Patches Applied Using Smart Update]]' } =head1 COMMON HOME INFORMATION Includes the reports generated by the IREQ module about the common home when present. =cut toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Common Product Home")%' toc '%INCLUDE("',${CUR.GROUP},'_IREQ_OSB_CH.toc")%' toc '%POP2%' =head1 ORACLE WEBLOGIC SERVER DOMAIN COLLECTIONS Includes all reports collected for the specified Oracle WebLogic Server domains. =cut # Identify the domains per Oracle WebLogic Server home var (@orp,%dom,%nam,%top) = () loop $key (grepSetting('^OSB_DOM\d+_REQ_DOMAIN$')) {var $tid = substr($key,0,-11) var $dom = catDir(getSetting($key)) next !testDir('d',$dom) if missing($dom{$dom}) var $dom{$dom} = addTarget('DOM_Req$$',{DOMAIN_HOME =>$dom,\ MISSING_HOME =>1,\ MISSING_COMMON=>1}) if and(defined($par = $dom{$dom}->get_wl_home),\ testDir('d',$par->get_info('wlh'))) call push($top{$par->get_info('oid')},$tid) else call push(@orp,$tid) var $nam{$tid} = basename($dom) } # Report the domains per Oracle WebLogic Server home var $cnt = 0 loop $oid (keys(%top)) {var ($flg,$tid) = ($cnt,replace($top{$oid}->[0],'_DOM','_TOP')) incr $cnt toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:Oracle WebLogic Server Overview")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_',$tid,'.toc")%' toc '%POP2%' loop $tid (@{$top{$oid}}) {toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$nam{$tid},"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_',$tid,'.toc")%' toc '%POP2%' } } # Report domains that are not associated to a Oracle WebLogic Server home pretoc '%PUSH("0: * Orphan Domains")%' loop $tid (@orp) {toc '%PUSH("%SPLIT%")%' toc '%PUSH("1+:',"'",$nam{$tid},"'",' Domain")%' toc '%INCLUDE("',${CUR.GROUP},'_WREQ_',$tid,'.toc")%' toc '%POP2%' } if hasTocOutput(true) toc '%POP%' unpretoc =head1 SEE ALSO L, L, L, L =begin credits =over 10 =item RDA 4.22: Maria Salzberger. =item RDA 4.24: Greg Cook, Andrew Salt, Maria Salzberger. =back =end credits =head1 COPYRIGHT NOTICE Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. =head1 TRADEMARK NOTICE Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. =cut