def __init__(self):
     self._repos = dict()
     mongo_db = 'ansible_db'
     mongo_col = 'repos'
     self.mongo_client = MongoClient(settings.get_mongodb_url())
     self.db = self.mongo_client[mongo_db]
     self.collection = self.db[mongo_col]
 def __init__(self):
     self._repos = dict()
     mongo_db = "ansible_db"
     mongo_col = "repos"
     self.mongo_client = MongoClient(settings.get_mongodb_url())
     self.db = self.mongo_client[mongo_db]
     self.collection = self.db[mongo_col]
Esempio n. 3
0
 def __init__(self):
     self._inventories = dict()
     self._mongo_client = MongoClient(settings.get_mongodb_url())
     self._db = self._mongo_client['ansible_db']
     self._collection = self._db['inventories']
     self._rebuild_from_db()
 def __init__(self):
     self._inventories = dict()
     self._mongo_client = MongoClient(settings.get_mongodb_url())
     self._db = self._mongo_client['ansible_db']
     self._collection = self._db['inventories']
     self._rebuild_from_db()
Esempio n. 5
0
import os
import common.settings as settings
from pymongo import MongoClient

DB_NAME = "ansible_job_dw"

job_db_connection = MongoClient(settings.get_mongodb_url())
job_db = job_db_connection[DB_NAME]