+

Search Tips   |   Advanced Search

 

###
### get_WebContainerServices.jacl
###
### Get Web Container Service attributes ###

proc get_WebContainerServices {snames} {


###
### set up globals
###

global AdminConfig
global AdminControl
global AdminApp


set cells [$AdminConfig list Cell]

foreach cell $cells {

     set cname [$AdminConfig showAttribute $cell name]
     set nodes [$AdminConfig list Node $cell]

     foreach node $nodes {

        set nname [$AdminConfig showAttribute $node name]

        foreach sname $snames {

            set serverid [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/]

            if {[llength $serverid] == 0} {
               continue 
            }


            set WebContainerID [$AdminConfig list WebContainer $serverid]

            set services [$AdminConfig showall $WebContainerID services]

            foreach service $services {
                puts $service
            }
            
        }
    }
}


}



###
### Main
###
### Test servers: nap_1_1 nap_2_1 
###


if { !($argc == 1) } {
   puts ""
   puts "Usage:, "
   puts " "
   puts "wsadmin.sh -username system -password password -f get_WebContainerServices.jacl \"server1 server2 ...\""
} else { 
   set xservers      [lindex $argv 0]  
   get_WebContainerServices $xservers 
}