btrbk: table_formats: add "*port" keys (skip-row-if-empty)

pull/274/head
Axel Burri 2019-04-01 20:12:33 +02:00
parent ca3bd505ef
commit cba4a93152
1 changed files with 24 additions and 24 deletions

48
btrbk
View File

@ -169,41 +169,41 @@ my %config_options = (
my @config_target_types = qw(send-receive raw); my @config_target_types = qw(send-receive raw);
my %table_formats = ( my %table_formats = (
list_volume => { table => [ qw( -volume_host volume_path ) ], list_volume => { table => [ qw( -volume_host -volume_port volume_path ) ],
long => [ qw( volume_host volume_path ) ], long => [ qw( volume_host volume_port volume_path ) ],
raw => [ qw( volume_url volume_host volume_path volume_rsh ) ], raw => [ qw( volume_url volume_host volume_port volume_path volume_rsh ) ],
}, },
list_source => { table => [ qw( -source_host source_subvol snapshot_path snapshot_name ) ], list_source => { table => [ qw( -source_host -source_port source_subvol snapshot_path snapshot_name ) ],
long => [ qw( source_host source_subvol snapshot_path snapshot_name ) ], long => [ qw( source_host source_port source_subvol snapshot_path snapshot_name ) ],
raw => [ qw( source_url source_host source_path snapshot_path snapshot_name source_rsh ) ], raw => [ qw( source_url source_host source_port source_path snapshot_path snapshot_name source_rsh ) ],
}, },
list_target => { table => [ qw( -target_host target_path ) ], list_target => { table => [ qw( -target_host -target_port target_path ) ],
long => [ qw( target_host target_path ) ], long => [ qw( target_host target_port target_path ) ],
raw => [ qw( target_url target_host target_path target_rsh ) ], raw => [ qw( target_url target_host target_port target_path target_rsh ) ],
}, },
list => { table => [ qw( -source_host source_subvol snapshot_path snapshot_name -target_host target_path ) ], list => { table => [ qw( -source_host -source_port source_subvol snapshot_path snapshot_name -target_host -target_port target_path ) ],
long => [ qw( source_host source_subvol snapshot_path snapshot_name snapshot_preserve target_host target_path target_preserve ) ], long => [ qw( source_host source_port source_subvol snapshot_path snapshot_name snapshot_preserve target_host target_port target_path target_preserve ) ],
raw => [ qw( source_url source_host source_subvol snapshot_path snapshot_name snapshot_preserve target_url target_host target_path target_preserve source_rsh target_rsh ) ], raw => [ qw( source_url source_host source_port source_subvol snapshot_path snapshot_name snapshot_preserve target_url target_host target_port target_path target_preserve source_rsh target_rsh ) ],
}, },
resolved => { table => [ qw( -source_host source_subvol snapshot_subvol status -target_host target_subvol ) ], resolved => { table => [ qw( -source_host -source_port source_subvol snapshot_subvol status -target_host -target_port target_subvol ) ],
long => [ qw( type source_host source_subvol snapshot_subvol status target_host target_subvol target_type ) ], long => [ qw( type source_host source_port source_subvol snapshot_subvol status target_host target_port target_subvol target_type ) ],
raw => [ qw( type source_host source_path snapshot_path snapshot_name status target_host target_path target_type source_rsh target_rsh ) ], raw => [ qw( type source_host source_port source_path snapshot_path snapshot_name status target_host target_port target_path target_type source_rsh target_rsh ) ],
}, },
schedule => { table => [ qw( action -host subvol scheme reason ) ], schedule => { table => [ qw( action -host -port subvol scheme reason ) ],
long => [ qw( action host root_path subvol_path scheme reason ) ], long => [ qw( action host port root_path subvol_path scheme reason ) ],
raw => [ qw( topic action url host path hod dow min h d w m y) ], raw => [ qw( topic action url host port path hod dow min h d w m y) ],
}, },
usage => { table => [ qw( -host path size used free ) ], usage => { table => [ qw( -host -port path size used free ) ],
long => [ qw( type host path size used device_size device_allocated device_unallocated device_missing device_used free free_min data_ratio metadata_ratio global_reserve global_reserve_used ) ], long => [ qw( type host port path size used device_size device_allocated device_unallocated device_missing device_used free free_min data_ratio metadata_ratio global_reserve global_reserve_used ) ],
raw => [ qw( type host path size used device_size device_allocated device_unallocated device_missing device_used free free_min data_ratio metadata_ratio global_reserve global_reserve_used ) ], raw => [ qw( type host port path size used device_size device_allocated device_unallocated device_missing device_used free free_min data_ratio metadata_ratio global_reserve global_reserve_used ) ],
RALIGN => { size=>1, used=>1, device_size=>1, device_allocated=>1, device_unallocated=>1, device_missing=>1, device_used=>1, free=>1, free_min=>1, data_ratio=>1, metadata_ratio=>1, global_reserve=>1, global_reserve_used=>1 }, RALIGN => { size=>1, used=>1, device_size=>1, device_allocated=>1, device_unallocated=>1, device_missing=>1, device_used=>1, free=>1, free_min=>1, data_ratio=>1, metadata_ratio=>1, global_reserve=>1, global_reserve_used=>1 },
}, },
transaction => { table => [ qw( type status target_host target_subvol source_host source_subvol parent_subvol ) ], transaction => { table => [ qw( type status target_host target_port target_subvol source_host source_port source_subvol parent_subvol ) ],
long => [ qw( localtime type status duration target_host target_subvol source_host source_subvol parent_subvol message ) ], long => [ qw( localtime type status duration target_host target_port target_subvol source_host source_port source_subvol parent_subvol message ) ],
tlog => [ qw( localtime type status target_url source_url parent_url message ) ], tlog => [ qw( localtime type status target_url source_url parent_url message ) ],
syslog => [ qw( type status target_url source_url parent_url message ) ], syslog => [ qw( type status target_url source_url parent_url message ) ],
raw => [ qw( time localtime type status duration target_url source_url parent_url message ) ], raw => [ qw( time localtime type status duration target_url source_url parent_url message ) ],
@ -2862,7 +2862,7 @@ sub vinfo_prefixed_keys($$)
$ret{$prefix} = $vinfo->{PRINT}; $ret{$prefix} = $vinfo->{PRINT};
$prefix .= '_'; $prefix .= '_';
} }
foreach (qw( URL PATH HOST NAME SUBVOL_PATH )) { foreach (qw( URL PATH HOST PORT NAME SUBVOL_PATH )) {
$ret{$prefix . lc($_)} = $vinfo->{$_}; $ret{$prefix . lc($_)} = $vinfo->{$_};
} }
$ret{$prefix . "subvol"} = $vinfo->{PATH}; $ret{$prefix . "subvol"} = $vinfo->{PATH};