[pve-devel] applied (common part): [PATCH v4] Add list and dump commands to pveum, refactor API

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Jun 18 12:44:55 CEST 2018


On 6/18/18 10:17 AM, Stoiko Ivanov wrote:
> changes from v3:
> * incorporated feedback
> * moved complete_user from PVE::AccessControl to PVE::Auth::Plugin, where the
>   userid standard option is registered.
> 
> Stoiko Ivanov (3):
>   add print_width property to JSONSchema definition
>   add print_text_table, print_entry to CLIHandler
>   add print_api_list, adapt handle_cmd
> 
>  src/PVE/CLIHandler.pm | 89 +++++++++++++++++++++++++++++++++++++++++++++++++--
>  src/PVE/JSONSchema.pm |  5 +++
>  2 files changed, 92 insertions(+), 2 deletions(-)

applied the common part of this with a few style, whitespace cleanups on
top. Thanks!

We could allow to pass a sort call back which could overwrite the default
behavior of sorting alphabetically by the first column's values.
A possible feature could be then to allow passing a --sortby <column> to
such CLI commands.
Centering columns could be also nice, just for the record :)

> 
> Stoiko Ivanov (2):
>   refactor API by unifying duplicate properties
>   pveum: add list and dump commands
> 
>  PVE/API2/ACL.pm           |  36 +++++++------
>  PVE/API2/AccessControl.pm |  12 ++---
>  PVE/API2/Group.pm         |  35 ++++++------
>  PVE/API2/Role.pm          |  54 ++++++++++++-------
>  PVE/API2/User.pm          | 132 +++++++++++++++++++++++-----------------------
>  PVE/AccessControl.pm      |   9 +---
>  PVE/Auth/Plugin.pm        |  11 +++-
>  PVE/CLI/pveum.pm          |  20 +++++++
>  8 files changed, 175 insertions(+), 134 deletions(-)
> 

I still need to take a closer look at your refactoring part.




More information about the pve-devel mailing list