[pve-devel] [PATCH access-control 3/3] Change naming to keep command abbreviation

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Sep 25 13:32:21 CEST 2017


On 09/22/2017 04:32 PM, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>   PVE/CLI/pveum.pm | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/CLI/pveum.pm b/PVE/CLI/pveum.pm
> index 7a4930f..d960437 100755
> --- a/PVE/CLI/pveum.pm
> +++ b/PVE/CLI/pveum.pm
> @@ -50,7 +50,7 @@ our $cmddef = {
>       useradd => [ 'PVE::API2::User', 'create_user', ['userid'] ],
>       usermod => [ 'PVE::API2::User', 'update_user', ['userid'] ],
>       userdel => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
> -    userlist => [ 'PVE::API2::User', 'index', undef, undef, sub {
> +    userlst => [ 'PVE::API2::User', 'index', undef, undef, sub {
>   	    my $userlist = shift;
>   
>   	    exit 0 if (!scalar(@$userlist));
> @@ -74,7 +74,7 @@ our $cmddef = {
>       groupadd => [ 'PVE::API2::Group', 'create_group', ['groupid'] ],
>       groupmod => [ 'PVE::API2::Group', 'update_group', ['groupid'] ],
>       groupdel => [ 'PVE::API2::Group', 'delete_group', ['groupid'] ],
> -    grouplist => [ 'PVE::API2::Group', 'index', undef, undef, sub {
> +    grouplst => [ 'PVE::API2::Group', 'index', undef, undef, sub {
>   	    my $grouplist = shift;
>   
>   	    exit 0 if (!scalar(@$grouplist));
> 


I want to avoid making sub command names more complicated, the one
character saved here has no real gain, I'd do the contrary and try to
make them more specific and clear. Possibly in the form of:

pveum group list
pveum group add
pveum group delete
...

As Dietmar mentioned in another thread.




More information about the pve-devel mailing list