[DRBD-user] drbdmanage API error message format

Dietmar Maurer dietmar at proxmox.com
Fri Jun 19 11:25:19 CEST 2015

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


> > Any suggestion how to implement that with perl?
> 
> 
> How about that?
> 
>     my $format = "Resource %(res)s has size %(size)sKB.";
>     my $args = { 'res' => "resource_0", 'size' => "20411" };
> 
>     my $loc_fmt = _($format);
> 
>     my @args = ();
>     push @args, $args->{$1} // "" while $loc_fmt =~ s,\%\((\w+)\),%,;

But this only implements a subset of python format features, so the question is
if drbdadmin restricts itself to this subset?




More information about the drbd-user mailing list