Exemple #1
0
    def setup_subparser(cls, subparser):
        """Add the deploy subparser: manage.py deploy [options]"""
        set_parser_epilog(subparser,
                          epilog=('''\
                Example:

                    manage.py deploy --function rule alert
                '''))

        # Flag to manually bypass rule staging for new rules upon deploy
        # This only has an effect if rule staging is enabled
        subparser.add_argument(
            '--skip-rule-staging',
            action='store_true',
            help='Skip staging of new rules so they go directly into production'
        )

        # flag to manually demote specific rules to staging during deploy
        subparser.add_argument(
            '--stage-rules',
            action=MutuallyExclusiveStagingAction,
            default=set(),
            help='Stage the rules provided in a space-separated list',
            nargs='+')

        # flag to manually bypass rule staging for specific rules during deploy
        subparser.add_argument(
            '--unstage-rules',
            action=MutuallyExclusiveStagingAction,
            default=set(),
            help='Unstage the rules provided in a space-separated list',
            nargs='+')

        add_default_lambda_args(subparser)
Exemple #2
0
    def setup_subparser(cls, subparser):
        """Add the rollback subparser: manage.py rollback [options]"""
        set_parser_epilog(subparser,
                          epilog=('''\
                Example:

                    manage.py rollback --function rule
                '''))

        add_default_lambda_args(subparser)