adoroszlai opened a new pull request, #7635:
URL: https://github.com/apache/ozone/pull/7635

   ## What changes were proposed in this pull request?
   
   - `GenericCli` does not need to implement `Callable` only for showing 
"incomplete command".  The same functionality is [provided by 
picocli](https://picocli.info/#_required_subcommands).
     - Implement `Callable` in subclasses where missing.  Implement `Runnable` 
where `call()` does not throw checked exceptions.
     - Remove `MissingSubcommandException`, no longer used.
   - Remove explicit check for required parameter in `GetUserInfoHandler`, 
picocli [does it](https://picocli.info/#_required_parameters) for us.
     - Remove `missingSubcommand` method from `GenericCli`, no longer used.
   
   https://issues.apache.org/jira/browse/HDDS-11991
   
   ## How was this patch tested?
   
   Tested `GetUserInfoHandler` without arguments:
   
   ```
   $ ozone tenant user info
   Missing required parameter: '<userPrincipal>'
   Usage: ozone tenant user info [-hjV] [--om-service-id=<omServiceID>]
                                 <userPrincipal>
   Get tenant related information of a user
         <userPrincipal>   User name (principal)
     -h, --help            Show this help message and exit.
     -j, --json            Print result in JSON
         --om-service-id=<omServiceID>
                           Service ID is required when OM is running in HA 
cluster
     -V, --version         Print version information and exit.
   ```
   
   Acceptance test covers `GenericCli` without subcommand (for top-level 
command `ozone admin`).
   
   CI:
   https://github.com/adoroszlai/ozone/actions/runs/12595048598
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to