[pmg-devel] applied: [PATCH pmg-api] pmgdb: add object type text to output

Stoiko Ivanov s.ivanov at proxmox.com
Thu Feb 22 21:56:29 CET 2024


thanks for the patch!


On Fri,  9 Feb 2024 14:37:00 +0100
Dominik Csapak <d.csapak at proxmox.com> wrote:

> this makes it easier to differntiate between e.g.
> a domain entry 'foo.com'
> and a regex entry 'foo.com'
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PMG/CLI/pmgdb.pm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/PMG/CLI/pmgdb.pm b/src/PMG/CLI/pmgdb.pm
> index 8368af8..6310112 100644
> --- a/src/PMG/CLI/pmgdb.pm
> +++ b/src/PMG/CLI/pmgdb.pm
> @@ -32,8 +32,9 @@ sub print_objects {
>      my $objects = $ruledb->load_group_objects ($og->{id});
>  
>      foreach my $obj (@$objects) {
> +	my $type_text = $obj->otype_text();
>  	my $desc = encode('UTF-8', $obj->short_desc());
> -	print "    OBJECT $obj->{id}: $desc\n";
> +	print "    OBJECT $type_text $obj->{id}: $desc\n";
>      }
>  }
>  





More information about the pmg-devel mailing list