[pve-devel] applied: [PATCH v3 access-control 18/20] pveum: add 'pveum user token add/update/remove/list'

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jan 29 21:45:08 CET 2020


On 1/21/20 1:54 PM, Fabian Grünbichler wrote:
> mapping 1-to-1 to the respective API paths
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/CLI/pveum.pm | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/PVE/CLI/pveum.pm b/PVE/CLI/pveum.pm
> index 537215f..c642f6d 100755
> --- a/PVE/CLI/pveum.pm
> +++ b/PVE/CLI/pveum.pm
> @@ -51,6 +51,12 @@ our $cmddef = {
>  	modify => [ 'PVE::API2::User', 'update_user', ['userid'] ],
>  	delete => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
>  	list   => [ 'PVE::API2::User', 'index', [], {}, $print_api_result, $PVE::RESTHandler::standard_output_options],
> +	token => {
> +	    add    => [ 'PVE::API2::User', 'generate_token', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
> +	    update    => [ 'PVE::API2::User', 'update_token_info', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
> +	    remove    => [ 'PVE::API2::User', 'remove_token', ['userid', 'tokenid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options ],
> +	    list   => [ 'PVE::API2::User', 'token_index', ['userid'], {}, $print_api_result, $PVE::RESTHandler::standard_output_options],
> +	}
>      },
>      group => {
>  	add    => [ 'PVE::API2::Group', 'create_group', ['groupid'] ],
> 

applied, thanks! But followed up with renaming the update subcommand
to "modify" for consistency, as all other such sub commands are named
that in pveum.





More information about the pve-devel mailing list