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

Function main

python3_cron_scripts/send_remote_server.py:228–373  ·  view source on GitHub ↗

Begin Main...

(logger=None)

Source from the content-addressed store, hash-verified

226
227
228def main(logger=None):
229 """
230 Begin Main...
231 """
232 if logger is None:
233 logger = LoggingUtil.create_log(__name__)
234
235 now = datetime.now()
236 print("Starting: " + str(now))
237 logger.info("Starting...")
238
239 parser = argparse.ArgumentParser(
240 description="Send specific collections to the remote MongoDB. If no arguments are provided, then all data is mirrored."
241 )
242 parser.add_argument(
243 "--send_zones", action="store_true", required=False, help="Send IP zones"
244 )
245 parser.add_argument(
246 "--send_ip_zones", action="store_true", required=False, help="Send IP zones"
247 )
248 parser.add_argument(
249 "--send_third_party_zones",
250 action="store_true",
251 required=False,
252 help="Send AWS, Azure, etc.",
253 )
254 parser.add_argument(
255 "--send_config", action="store_true", required=False, help="Send configs"
256 )
257 parser.add_argument(
258 "--send_dns_records",
259 action="store_true",
260 required=False,
261 help="Replace all DNS records",
262 )
263 parser.add_argument(
264 "--send_dns_diff",
265 action="store_true",
266 required=False,
267 help="Send new DNS records",
268 )
269 parser.add_argument(
270 "--send_all",
271 action="store_true",
272 required=False,
273 help="Send all records",
274 )
275 parser.add_argument(
276 "--date_diff",
277 default=2,
278 type=int,
279 help="The number of days used for identifying new records in send_dns_diff",
280 )
281 args = parser.parse_args()
282
283 send_all = False
284 if len(sys.argv) == 1 or args.send_all:
285 send_all = True

Callers 1

Calls 13

record_job_startMethod · 0.95
record_job_errorMethod · 0.95
record_job_completeMethod · 0.95
update_zonesFunction · 0.85
update_ip_zonesFunction · 0.85
update_aws_cidrsFunction · 0.85
update_azure_cidrsFunction · 0.85
update_akamai_cidrsFunction · 0.85
update_gcp_cidrsFunction · 0.85
update_configFunction · 0.85
update_all_dnsFunction · 0.85
update_all_dns_diff_modeFunction · 0.85

Tested by

no test coverage detected