]> git.proxmox.com Git - librados2-perl.git/commitdiff
use json format by default
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 16 Jan 2014 12:23:47 +0000 (13:23 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 16 Jan 2014 12:24:28 +0000 (13:24 +0100)
PVE/RADOS.pm

index 5f6e0f084005d4fa9d17363fa3da3706b2d1490e..d3794509c46304e81a58b8637f5b671573ec7eb1 100644 (file)
@@ -69,6 +69,8 @@ sub cluster_stat {
 sub mon_command {
     my ($self, $cmd) = @_;
 
+    $cmd->{format} = 'json' if !$cmd->{format};
+
     my $json = encode_json($cmd);
     my $raw = pve_rados_mon_command($self->{conn}, [ $json ]);
     if ($cmd->{format} && $cmd->{format} eq 'json') {