
import ibmcnx.functions

cell = AdminControl.getCell()
cellname = "/Cell:" + cell + "/"

# Get a list of all databases except DefaultEJBTimerDataSource and OTiSDataSource
dbs = AdminConfig.list('DataSource',AdminConfig.getid(cellname)).splitlines()
dsidlist = []
# remove unwanted databases
for db in dbs:
    dbname = db.split('(')
    n = 0
    for i in dbname:
        # i is only the name of the DataSource, db is DataSource ID!
        if n == 0 and i != "DefaultEJBTimerDataSource" and i != 'OTiSDataSource':
            dsidlist.append(str(db).replace('"',''))
        n += 1

dsidlist.sort()

for dsid in dsidlist:
    print "AdminConfig.list( dsid ): "
    AdminConfig.showAttribute(dsid,"propertySet")

import ibmcnx.functions

cell = AdminControl.getCell()
cellname = "/Cell:" + cell + "/"

# Get a list of all databases except DefaultEJBTimerDataSource and OTiSDataSource
dbs = AdminConfig.list('DataSource',AdminConfig.getid(cellname)).splitlines()
dsidlist = []
# remove unwanted databases
for db in dbs:
    dbname = db.split('(')
    n = 0
    for i in dbname:
        # i is only the name of the DataSource, db is DataSource ID!
        if n == 0 and i != "DefaultEJBTimerDataSource" and i != 'OTiSDataSource':
            dsidlist.append(str(db).replace('"',''))
        n += 1

dsidlist.sort()

for dsid in dsidlist:
    propertySet = AdminConfig.showAttribute(dsid,"propertySet")
    propertyList = AdminConfig.list("J2EEResourceProperty", propertySet).splitlines()
Create documentation of DataSource Settings
8: Create documentation of DataSource Settings 

Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
  
  import ibmcnx.functions
  
  cell = AdminControl.getCell()
  cellname = "/Cell:" + cell + "/"
  
  # Get a list of all databases except DefaultEJBTimerDataSource and OTiSDataSource
  dbs = AdminConfig.list('DataSource',AdminConfig.getid(cellname)).splitlines()
  dsidlist = []
  # remove unwanted databases
  for db in dbs:
      dbname = db.split('(')
      n = 0
      for i in dbname:
          # i is only the name of the DataSource, db is DataSource ID!
          if n == 0 and i != "DefaultEJBTimerDataSource" and i != 'OTiSDataSource':
              dsidlist.append(str(db).replace('"',''))
          n += 1
  
  dsidlist.sort()
  
  for dsid in dsidlist:
-     print "AdminConfig.list( dsid ): "
-     AdminConfig.showAttribute(dsid,"propertySet")
+     propertySet = AdminConfig.showAttribute(dsid,"propertySet")
+     propertyList = AdminConfig.list("J2EEResourceProperty", propertySet).splitlines()
Create documentation of DataSource Settings
## Code Before:

import ibmcnx.functions

cell = AdminControl.getCell()
cellname = "/Cell:" + cell + "/"

# Get a list of all databases except DefaultEJBTimerDataSource and OTiSDataSource
dbs = AdminConfig.list('DataSource',AdminConfig.getid(cellname)).splitlines()
dsidlist = []
# remove unwanted databases
for db in dbs:
    dbname = db.split('(')
    n = 0
    for i in dbname:
        # i is only the name of the DataSource, db is DataSource ID!
        if n == 0 and i != "DefaultEJBTimerDataSource" and i != 'OTiSDataSource':
            dsidlist.append(str(db).replace('"',''))
        n += 1

dsidlist.sort()

for dsid in dsidlist:
    print "AdminConfig.list( dsid ): "
    AdminConfig.showAttribute(dsid,"propertySet")
## Instruction:
Create documentation of DataSource Settings
## Code After:

import ibmcnx.functions

cell = AdminControl.getCell()
cellname = "/Cell:" + cell + "/"

# Get a list of all databases except DefaultEJBTimerDataSource and OTiSDataSource
dbs = AdminConfig.list('DataSource',AdminConfig.getid(cellname)).splitlines()
dsidlist = []
# remove unwanted databases
for db in dbs:
    dbname = db.split('(')
    n = 0
    for i in dbname:
        # i is only the name of the DataSource, db is DataSource ID!
        if n == 0 and i != "DefaultEJBTimerDataSource" and i != 'OTiSDataSource':
            dsidlist.append(str(db).replace('"',''))
        n += 1

dsidlist.sort()

for dsid in dsidlist:
    propertySet = AdminConfig.showAttribute(dsid,"propertySet")
    propertyList = AdminConfig.list("J2EEResourceProperty", propertySet).splitlines()