bind-cfgd.py 663 B

12345678910111213141516171819202122232425262728
  1. import ISC
  2. class ConfigManager:
  3. def __init__(self):
  4. self.cc = ISC.CC.Session()
  5. self.cc.group_subscribe("ConfigManager")
  6. def read_config(self, filename):
  7. pass
  8. def write_config(self, filename):
  9. pass
  10. def run(self):
  11. while (True):
  12. env, msg = self.cc.group_recvmsg(False)
  13. print "message: "
  14. print msg
  15. pass
  16. if __name__ == "__main__":
  17. print "Hello, BIND10 world!"
  18. try:
  19. cm = ConfigManager()
  20. cm.run()
  21. except ISC.CC.SessionError, se:
  22. print "Error creating config manager, "\
  23. "is the command channel daemon running?"