Thanks to my colleague Prasen -
save the following as update_dns.py
import os
domainHome=os.environ['DOMAIN_HOME']
bpmServer=os.environ['BPM_SERVER_NAME']
ec2DNS=os.environ['ORACLE_HOSTNAME']
externalDNSNameKey='ExternalDNSName'
readDomain(domainHome)
cd ('Servers/'+bpmServer)
currentDNS=wl.get(externalDNSNameKey)
print "Replacing current DNS=%s with %s"%(currentDNS ,ec2DNS)
set(externalDNSNameKey, ec2DNS)
updateDomain()
closeDomain()
print ("EXternal DNS updated")
execute via $SOA_HOME/common/bin/wlst.sh
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment