]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/CLIFormatter.pm
print_api_result_plain: new helper
[pve-common.git] / src / PVE / CLIFormatter.pm
index d964b51cda6343d3a75454651fba6a04eea198fe..2a2ff30b494e1b6164bf997aea0d565e366f6174 100644 (file)
@@ -436,4 +436,16 @@ sub print_api_result {
     }
 }
 
+sub print_api_result_plain {
+    my ($data, $result_schema, $props_to_print, $options) = @_;
+
+    # avoid borders and header, ignore terminal width
+    $options = $options ? { %$options } : {}; # copy
+
+    $options->{noheader} //= 1;
+    $options->{noborder} //= 1;
+
+    print_api_result($data, $result_schema, $props_to_print, $options, {});
+}
+
 1;