Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | # This imports and runs ../../xos-observer.py |
| 4 | |
| 5 | import importlib |
| 6 | import os |
| 7 | import sys |
Scott Baker | 90d8a18 | 2016-08-11 09:07:42 -0700 | [diff] [blame] | 8 | sys.path.append('/opt/xos') |
| 9 | |
| 10 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings") |
| 11 | |
| 12 | import synchronizers.base.event_loop |
| 13 | if hasattr(synchronizers.base.event_loop, "set_driver"): |
| 14 | # VTN synchronizer needs the OpenStack driver |
| 15 | from openstack_xos.driver import OpenStackDriver |
| 16 | synchronizers.base.event_loop.set_driver(OpenStackDriver()) |
| 17 | |
| 18 | mod = importlib.import_module("synchronizers.base.xos-synchronizer") |
Scott Baker | c3ce3e7 | 2016-06-20 17:35:19 -0700 | [diff] [blame] | 19 | mod.main() |
Scott Baker | 90d8a18 | 2016-08-11 09:07:42 -0700 | [diff] [blame] | 20 | |