onedns/onedns/monitor.py

14 lines
242 B
Python
Raw Normal View History

2016-07-14 16:56:32 +03:00
import time
from onedns import api
2016-07-14 16:56:32 +03:00
class OneMonitor(api.OneDNS):
"""
Daemon that syncs OpenNebula VMs with OneDNS
"""
def run(self, interval=60):
2016-07-14 16:56:32 +03:00
while True:
self.sync()
2016-07-14 16:56:32 +03:00
time.sleep(interval)