]> git.proxmox.com Git - librados2-perl.git/commitdiff
improve examples
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 17 Jan 2014 08:20:31 +0000 (09:20 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 17 Jan 2014 08:20:31 +0000 (09:20 +0100)
PVE/RADOS.pm
test.pl

index f607fea2130b88e97c7854facdc36408fe6dbb66..b736c046fdbfda250f38fc618bde053310de7ec8 100644 (file)
@@ -65,7 +65,8 @@ sub cluster_stat {
     return  pve_rados_cluster_stat($self->{conn});
 }
 
-# example: { prefix => 'mon dump', format => 'json' }
+# example1: { prefix => 'get_command_descriptions'})
+# example2: { prefix => 'mon dump', format => 'json' }
 sub mon_command {
     my ($self, $cmd) = @_;
 
diff --git a/test.pl b/test.pl
index e194953e4dbce9c2e57996d93a8edc744544acc8..1826147af64d0dbdb839d088c1cee8bf0d0c5948 100755 (executable)
--- a/test.pl
+++ b/test.pl
@@ -9,11 +9,12 @@ use Data::Dumper;
 
 use PVE::RADOS;
 
-print "TEST1\n";
 my $rados = PVE::RADOS::new();
-print "TEST2\n";
 
-my $res = $rados->mon_command({ prefix => 'mon dump', format => 'json' });
+my $res = $rados->mon_command({ prefix => 'get_command_descriptions'});
+print Dumper($res);
+
+$res = $rados->mon_command({ prefix => 'mon dump', format => 'json' });
 print Dumper($res);
 $res = $rados->mon_command({ prefix => 'mon dump', format => 'json' });
 print Dumper($res);