Monday, December 9, 2013

wsadminjython view VirtualHost Port Details

vh=AdminConfig.list('VirtualHost').splitlines()
for i in vh:
      x=len(AdminConfig.list('HostAlias',i).splitlines())
      iname=i.find('(')
      print "Port Details of "+i[0:iname]
      while x > 0:
        print AdminConfig.showAttribute(AdminConfig.list('HostAlias',i).splitlines()[x-1],'port')
        x=x-1






In Python indent is very important so please be careful while copying it.

No comments:

Post a Comment

Your suggestions please