def _sync_data_source(self):
     if self._data_source is None:
         self._data_source = \
             retrieve_data_source(self._kvstore, self._data_source_name)
     assert self._data_source is not None, \
         "data source {} is not in kvstore".format(self._data_source_name)
     return self._data_source
Exemple #2
0
 def __init__(self,
              data_source_name,
              etcd_name,
              etcd_base_dir,
              etcd_addrs,
              use_mock_etcd=False):
     self._etcd = EtcdClient(etcd_name, etcd_addrs, etcd_base_dir,
                             use_mock_etcd)
     self._data_source = retrieve_data_source(self._etcd, data_source_name)
Exemple #3
0
 def __init__(self,
              data_source_name,
              db_database,
              db_base_dir,
              db_addr,
              db_username,
              db_password,
              use_mock_etcd=False):
     self._kvstore = DBClient(db_database, db_addr, db_username,
                              db_password, db_base_dir, use_mock_etcd)
     self._data_source = retrieve_data_source(self._kvstore,
                                              data_source_name)
 def _sync_data_source(self):
     if self._data_source is None:
         self._data_source = \
             retrieve_data_source(self._etcd, self._data_source_name)
Exemple #5
0
 def __init__(self, data_source_name, kvstore_type, use_mock_etcd=False):
     self._kvstore = DBClient(kvstore_type, use_mock_etcd)
     self._data_source = retrieve_data_source(self._kvstore,
                                              data_source_name)