Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # coding=utf-8
- from CMDB import Ingress, Egress
- class MySQL:
- def __init__(self, connectionString):
- self.connectionString = Egress("database.connectionString", connectionString)
- def updateConnectionString(self, newConnectionString):
- print "MySQL: New connection string is", newConnectionString
- self.connectionString.update(newConnectionString)
- class Pohape:
- def __init__(self):
- self.connectionString = Ingress("database.connectionString", self.updateConnectionString)
- def updateConnectionString(self, newConnectionString):
- print "Pohape: database connection string changed to", newConnectionString
- print "Pohape: Recycling"
- return True
- mysql = MySQL("jdbc://10.8.0.1")
- pohape = Pohape()
- mysql.updateConnectionString("jdbc://localhost")
- from CMDB import CMDB
- print CMDB.getValueHistory("database.connectionString")
Add Comment
Please, Sign In to add comment