Exemplo n.º 1
0
    def add_all_parsers(subparsers):
        # type: (_SubParsersAction) -> None
        """Initialize parsers for all grouper-ctl commands.

        This is a static method since it has to be called before command-line parsing, but
        constructing a CtlCommandFactory requires a UseCaseFactory, which in turn requires
        information such as the database URL that may be overridden on the command line and thus
        cannot be created until after command-line parsing.
        """
        parser = subparsers.add_parser("dump_sql", help="Dump database schema")
        DumpSqlCommand.add_arguments(parser)
        parser = subparsers.add_parser("permission",
                                       help="Manipulate permissions")
        PermissionCommand.add_arguments(parser)
        parser = subparsers.add_parser("service_account",
                                       help="Manipulate service accounts")
        ServiceAccountCommand.add_arguments(parser)
        parser = subparsers.add_parser("sync_db",
                                       help="Create database schema")
        SyncDbCommand.add_arguments(parser)
        parser = subparsers.add_parser("user", help="Manipulate users")
        UserCommand.add_arguments(parser)
        parser = subparsers.add_parser(
            "user_proxy", help="Start a development reverse proxy")
        UserProxyCommand.add_arguments(parser)
Exemplo n.º 2
0
    def add_all_parsers(subparsers):
        # type: (_SubParsersAction) -> None
        """Initialize parsers for all grouper-ctl commands.

        This is a static method since it has to be called before command-line parsing, but
        constructing a CtlCommandFactory requires a UseCaseFactory, which in turn requires
        information such as the database URL that may be overridden on the command line and thus
        cannot be created until after command-line parsing.
        """
        parser = subparsers.add_parser("dump_sql", help="Dump database schema")
        DumpSqlCommand.add_arguments(parser)
        parser = subparsers.add_parser("permission", help="Manipulate permissions")
        PermissionCommand.add_arguments(parser)
        parser = subparsers.add_parser("sync_db", help="Create database schema")
        SyncDbCommand.add_arguments(parser)
        parser = subparsers.add_parser("user", help="Manipulate users")
        UserCommand.add_arguments(parser)
        parser = subparsers.add_parser("user_proxy", help="Start a development reverse proxy")
        UserProxyCommand.add_arguments(parser)
Exemplo n.º 3
0
 def construct_user_proxy_command(self):
     # type: () -> UserProxyCommand
     return UserProxyCommand(self.settings)