I have a script which needs to be updated. Currently it demands password for all the datasources but now we have some multi datasources as well along with the generic datasources. My requirement is that whenever the datasource is a multi datasource, it should skip that and shouldn't prompt for the password. I have listed the current script below.
def updateJDBCPasswords():
PARAMS_TEMPLATE = '/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s'
domainConfig()
# Get JDBC DataSources
cd("JDBCSystemResources")
dataSources = cmo.getJDBCSystemResources()
edit()
# For each DataSource update the password
for dataSource in dataSources :
dsName = dataSource.getName()
password=raw_input("Enter database password for "+ dsName +" : ")
cd(PARAMS_TEMPLATE % (dsName, dsName, dsName) )
cmo.setPassword(password)
So far I have seen my threads/blogs but none of those is relevant to my problem. There is help for creating the multidatasources but couldn't find any hint how to identify it in order to satisfy my scenario.