def attach_create_subcommand()

in remote_settings/subcommands/create.py [0:0]


def attach_create_subcommand(subparsers):
    """Adds the `create` subcommand and its associated arguments as a subparser.

    Args:
        subparsers (_SubParsersAction): The subparser action object to add
        this subcommand to.
    """

    create_parser = subparsers.add_parser(
        "create",
        help="create and upload a new record to Remote Settings",
        formatter_class=argparse.MetavarTypeHelpFormatter,
    )
    create_parser.add_argument(
        "-d",
        "--dry-run",
        action="store_true",
        help="verify the authentication and record data, but do not create",
    )
    create_parser.add_argument(
        "-m",
        "--mock-connection",
        action="store_true",
        help="mock the connection to the server for testing",
    )
    create_parser.add_argument(
        "-q",
        "--quiet",
        action="store_true",
        help="do not print informational non-error output to the terminal",
    )
    create_parser.add_argument(
        "--server",
        type=str,
        choices=["dev", "stage", "prod"],
        help="the server where records will be created",
        required=True,
    )
    create_parser.add_argument(
        "--version",
        metavar="VERSION",
        type=validate_version,
        help="the semantic version of the record",
        required=True,
    )
    create_parser.add_argument(
        "--test",
        action="store_true",
        help=argparse.SUPPRESS,
    )

    group = create_parser.add_mutually_exclusive_group(required=True)
    group.add_argument(
        "--path",
        metavar="PATH",
        type=validate_path,
        help="the path to the file attachment to upload",
    )
    group.add_argument(
        "--lang-pair",
        metavar="PAIR",
        type=validate_lang_pair,
        help="the language pair for which to publish all associated files, e.g. 'enes'",
    )