Yes, Here is the python script which prints all WebSphere Variables created at the cell level. You change the cell scope to either node, cluster or server level depends on where the variable is created.
Thanks
Anant
*******************************************************************************
import sys
def wsadminToList(inStr):
outList=[]
if (len(inStr)>0 and inStr[0]=='[' and inStr[-1]==']'):
tmpList = inStr[1:-1].split(" ")
else:
tmpList = inStr.split("\n") #splits for Windows or Linux
for item in tmpList:
item = item.rstrip(); #removes any Windows "\r"
if (len(item)>0):
outList.append(item)
return outList
#endDef
cell = AdminConfig.list("Cell")
cellName = AdminConfig.showAttribute(cell, "name")
cellWebSphereVariableMap = AdminConfig.getid("/Cell:"+cellName+"/VariableMap:/")
cellEntries = AdminConfig.showAttribute(cellWebSphereVariableMap, "entries")
entryList = wsadminToList(cellEntries)
if (len(cellEntries) != '[]'):
for cellEntry in entryList:
varName = AdminConfig.showAttribute(cellEntry, "symbolicName")
print "var Name is : "+varName
varVal = AdminConfig.showAttribute(cellEntry, "value")
print " var value is : "+varVal
#endFor
#endIf
*******************************************************************************