MCPcopy Create free account
hub / github.com/adobe/Marinus / create_config_collection

Function create_config_collection

python3_cron_scripts/setup.py:265–284  ·  view source on GitHub ↗

Marinus maintains a configuration which tells it meta information about the organizations that it tracks. This includes registration information that would be included in Whois records and TLS certificates. This function initializes that table with empty values and is part of the initia

(mongo_collection)

Source from the content-addressed store, hash-verified

263
264
265def create_config_collection(mongo_collection):
266 """
267 Marinus maintains a configuration which tells it meta information about the organizations that it tracks.
268 This includes registration information that would be included in Whois records and TLS certificates.
269 This function initializes that table with empty values and is part of the initial set up process.
270 """
271 new_config = {}
272 new_config["DNS_Admins"] = []
273 new_config["SSL_Orgs"] = []
274 new_config["Whois_Orgs"] = []
275 new_config["Whois_Name_Servers"] = []
276 now = datetime.now()
277 new_config["updated"] = now
278
279 config_collection = mongo_collection.get_config_connection()
280 if config_collection.count_documents({}) > 0:
281 print("WARNING: The config collection already exists. Skipping initialiation.")
282 return
283
284 config_collection.insert_one(new_config)
285
286
287def add_tls_org(mongo_connector, org):

Callers 1

mainFunction · 0.85

Calls 1

get_config_connectionMethod · 0.45

Tested by

no test coverage detected