nodece commented on code in PR #22209:
URL: https://github.com/apache/pulsar/pull/22209#discussion_r1524577078


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTenants.java:
##########
@@ -119,41 +114,34 @@ void run() throws PulsarAdminException {
         }
     }
 
-    @Parameters(commandDescription = "Deletes an existing tenant")
+    @Command(description = "Deletes an existing tenant")
     private class Delete extends CliCommand {
-        @Parameter(description = "tenant-name", required = true)
-        private java.util.List<String> params;
+        @Parameters(description = "tenant-name", arity = "1")
+        private String tenant;
 
-        @Parameter(names = { "-f",
+        @Option(names = { "-f",
                 "--force" }, description = "Delete a tenant forcefully by 
deleting all namespaces under it.")
         private boolean force = false;
 
         @Override
         void run() throws PulsarAdminException {
-            String tenant = getOneArgument(params);
             getAdmin().tenants().deleteTenant(tenant, force);
         }
     }
 
     public CmdTenants(Supplier<PulsarAdmin> admin) {
         super("tenants", admin);
-        jcommander.addCommand("list", new List());
-        jcommander.addCommand("get", new Get());
-        jcommander.addCommand("create", new Create());
-        jcommander.addCommand("update", new Update());
-        jcommander.addCommand("delete", new Delete());
+        addCommand("list", new List());
+        addCommand("get", new Get());
+        addCommand("create", new Create());
+        addCommand("update", new Update());
+        addCommand("delete", new Delete());
     }
 
-    @Parameters(hidden = true)
+    @Command(hidden = true)
     static class CmdProperties extends CmdTenants {
         public CmdProperties(Supplier<PulsarAdmin> admin) {
             super(admin);
         }
-
-        @Override
-        public boolean run(String[] args) {
-            System.err.println("WARN: The properties subcommand is deprecated. 
Please use tenants instead");

Review Comment:
   This command has been hidden, but you can still use it.
   
   



-- 
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]

Reply via email to