blob: 8d71f3ab6a12d24d206c512b0b51be6632f2ba5a [file] [log] [blame]
Zack Williams3cee57f2018-05-30 14:20:28 -07001#!/usr/bin/env python
Matteo Scandolof0441032017-08-08 13:05:26 -07002
3# Copyright 2017-present Open Networking Foundation
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
Matteo Scandoloceccb1f2017-06-05 10:35:44 -070017import os
Scott Bakerc808c672019-02-04 11:38:20 -080018from xossynchronizer import Synchronizer
Matteo Scandoloceccb1f2017-06-05 10:35:44 -070019from xosconfig import Config
20
Matteo Scandoloaf4ba422018-06-12 13:39:36 -070021base_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/config.yaml')
22mounted_config_file = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/mounted_config.yaml')
23
24if os.path.isfile(mounted_config_file):
25 Config.init(base_config_file, 'synchronizer-config-schema.yaml', mounted_config_file)
26else:
27 Config.init(base_config_file, 'synchronizer-config-schema.yaml')
Matteo Scandoloceccb1f2017-06-05 10:35:44 -070028
Scott Bakerc808c672019-02-04 11:38:20 -080029from xossynchronizer.event_loop import set_driver
30from driver import OpenStackDriver
Matteo Scandoloceccb1f2017-06-05 10:35:44 -070031set_driver(OpenStackDriver())
32
Scott Bakerc808c672019-02-04 11:38:20 -080033# Update the CA certificates
34os.system("update-ca-certificates")
Matteo Scandoloceccb1f2017-06-05 10:35:44 -070035
Scott Bakerc808c672019-02-04 11:38:20 -080036Synchronizer().run()