# List WAS types that are currently instantiated
# by this installation of WAS
# Show the required attributes for each type

def listAttributeValues( name ):
	print " * * * * * line 06"
	raw = AdminConfig.show(name)
	attributeList = raw.splitlines()
	print " * * * * * line 09"
	for x in attributeList:
		print "    - - - ->",x
#  ===,":::",AdminControl.getAttribute(x)

raw = AdminConfig.types()
t = raw.splitlines()
print len(t),"types in WAS v6.1"
for a in t:
  alive = AdminControl.queryNames("type="+a+",*").splitlines()
  if len(alive ) > 0:
	print "\nThere are",len(alive),a+("(s)"),"instantiated at this time"
	print "Required",AdminConfig.required(a)
	for x in alive:
		print " * * * * * line 22"
		id = AdminControl.getConfigId(x)
		print " * * * * * line 24"
		if len(id) > 0:
			objectName = AdminConfig.getObjectName(id)
			print " * * * * * line 27"
			print id
			print " * * * * * line 29"
			listAttributeValues(id)
		else:
		  	print "WARNING:",x,"has no configuration ID"
print " * * * * * line 33"
AdminConfig.reset()
