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