[pve-devel] r5169 - pve-common/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Sep 17 11:10:02 CEST 2010


Author: dietmar
Date: 2010-09-17 09:10:02 +0000 (Fri, 17 Sep 2010)
New Revision: 5169

Modified:
   pve-common/trunk/ChangeLog
   pve-common/trunk/RESTHandler.pm
Log:


Modified: pve-common/trunk/ChangeLog
===================================================================
--- pve-common/trunk/ChangeLog	2010-09-17 08:42:35 UTC (rev 5168)
+++ pve-common/trunk/ChangeLog	2010-09-17 09:10:02 UTC (rev 5169)
@@ -1,6 +1,7 @@
 2010-09-17  Proxmox Support Team  <support at proxmox.com>
 
 	* RESTHandler.pm (AUTOLOAD): bug fix.
+	(usage_str): add info about required options.
 
 2010-09-15  Proxmox Support Team  <support at proxmox.com>
 

Modified: pve-common/trunk/RESTHandler.pm
===================================================================
--- pve-common/trunk/RESTHandler.pm	2010-09-17 08:42:35 UTC (rev 5168)
+++ pve-common/trunk/RESTHandler.pm	2010-09-17 09:10:02 UTC (rev 5169)
@@ -302,6 +302,12 @@
 	$res .= "\n",
 	$res .= Text::Wrap::wrap($indend, $indend, ($descr)) . "\n\n";
 
+	if (my $req = $phash->{requires}) {
+	    my $tmp = "Requires option(s): ";
+	    $tmp .= ref($req) ? join(', ', @$req) : $req;
+	    $res .= Text::Wrap::wrap($indend, $indend, ($tmp)). "\n\n";
+	}
+
 	return $res;
     };
 



More information about the pve-devel mailing list