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)
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("permission", help="Manipulate permissions") PermissionCommand.add_arguments(parser) parser = subparsers.add_parser("user", help="Manipulate users") UserCommand.add_arguments(parser)
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)
def construct_user_command(self): # type: () -> UserCommand return UserCommand(self.settings, self.usecase_factory)