Begin the main function.
()
| 441 | |
| 442 | |
| 443 | def main(): |
| 444 | """ |
| 445 | Begin the main function. |
| 446 | """ |
| 447 | parser = argparse.ArgumentParser( |
| 448 | description="Setup utility for the Marinus MongoDB instance." |
| 449 | ) |
| 450 | parser.add_argument( |
| 451 | "--create_collections", |
| 452 | help="Initialize the collections in the database.", |
| 453 | action="store_true", |
| 454 | ) |
| 455 | parser.add_argument( |
| 456 | "--add_zone", |
| 457 | metavar="ROOT_DOMAIN", |
| 458 | help="Add a new domain zone to Marinus", |
| 459 | action="store", |
| 460 | type=str, |
| 461 | ) |
| 462 | parser.add_argument( |
| 463 | "--add_IPv4_network", |
| 464 | metavar="IPv4_CIDR", |
| 465 | help="Add an IPv4 CIDR zone to Marinus", |
| 466 | action="store", |
| 467 | type=str, |
| 468 | ) |
| 469 | parser.add_argument( |
| 470 | "--add_IPv6_network", |
| 471 | metavar="IPv6_CIDR", |
| 472 | help="Add an IPv6 CIDR zone to Marinus", |
| 473 | action="store", |
| 474 | type=str, |
| 475 | ) |
| 476 | parser.add_argument( |
| 477 | "--add_tls_org", |
| 478 | metavar="TLS_ORGANIZATION_VALUE", |
| 479 | help="Add a TLS organization to the Marinus config", |
| 480 | action="store", |
| 481 | type=str, |
| 482 | ) |
| 483 | parser.add_argument( |
| 484 | "--add_whois_org", |
| 485 | metavar="WHOIS_ORGANIZATION_VALUE", |
| 486 | help="Add a Whois organization to the Marinus config", |
| 487 | action="store", |
| 488 | type=str, |
| 489 | ) |
| 490 | parser.add_argument( |
| 491 | "--add_whois_name_server", |
| 492 | metavar="WHOIS_NAME_SERVER_VALUE", |
| 493 | help="Add a Whois name server to the Marinus config", |
| 494 | action="store", |
| 495 | type=str, |
| 496 | ) |
| 497 | parser.add_argument( |
| 498 | "--add_dns_admin", |
| 499 | metavar="DNS_ADMIN_EMAIL", |
| 500 | help="Add a DNS administrator to the Marinus config", |
no test coverage detected