###
### list_clusters.jacl
###

puts " " 

set cell [$AdminConfig list Cell]

set cname [$AdminConfig showAttribute $cell name]



set clusters [$AdminConfig list ServerCluster $cell]


puts "  Number of ServerClusters in $cname: [llength $clusters]"

foreach cluster $clusters {

    set clname [$AdminConfig showAttribute $cluster name]

    set memberlist [$AdminConfig showAttribute $cluster members]

    set members [lindex $memberlist 0]

    puts "  Cluster $clname has [llength $members] members"

    foreach member $members {
       set mname [$AdminConfig showAttribute $member memberName]
       set weight [$AdminConfig showAttribute $member weight]
       puts "    Member $mname has weight $weight"
    }
}