adutra commented on code in PR #940:
URL: https://github.com/apache/polaris/pull/940#discussion_r1942444984
##########
quarkus/admin/src/main/java/org/apache/polaris/admintool/BootstrapCommand.java:
##########
@@ -30,51 +31,94 @@
description = "Bootstraps realms and root principal credentials.")
public class BootstrapCommand extends BaseCommand {
- @CommandLine.Option(
- names = {"-r", "--realm"},
- paramLabel = "<realm>",
- required = true,
- description = "The name of a realm to bootstrap.")
- List<String> realms;
+ @CommandLine.ArgGroup(multiplicity = "1")
+ InputOptions inputOptions;
- @CommandLine.Option(
- names = {"-c", "--credential"},
- paramLabel = "<realm,clientId,clientSecret>",
- description =
- "Root principal credentials to bootstrap. Must be of the form
'realm,clientId,clientSecret'.")
- List<String> credentials;
+ static class InputOptions {
+
+ @CommandLine.ArgGroup(multiplicity = "1", exclusive = false)
+ StandardInputOptions stdinOptions;
+
+ @CommandLine.ArgGroup(multiplicity = "1")
+ FileInputOptions fileOptions;
+
+ static class StandardInputOptions {
+
+ @CommandLine.Option(
+ names = {"-r", "--realm"},
+ paramLabel = "<realm>",
+ required = true,
+ description = "The name of a realm to bootstrap.")
+ List<String> realms;
Review Comment:
The idea is that users may want to bootstrap a realm without providing
credentials (they would be randomly-generated). Should I remove this option? It
is true that the file-based approach does not permit randomly-generated
credentials.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]