You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/06/21 01:18:08 UTC

svn commit: r1495233 - /bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py

Author: rjollos
Date: Thu Jun 20 23:18:08 2013
New Revision: 1495233

URL: http://svn.apache.org/r1495233
Log:
Refs #509: Expose global commands in `ProductAdminModule`. Patch by Olemis.

Modified:
    bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py

Modified: bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py?rev=1495233&r1=1495232&r2=1495233&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py (original)
+++ bloodhound/trunk/bloodhound_multiproduct/multiproduct/product_admin.py Thu Jun 20 23:18:08 2013
@@ -295,9 +295,11 @@ class ProductAdminModule(Component):
             mgr = self.product_admincmd_mgr(args[0])
             return mgr.complete_command(args[1:])
 
+    GLOBAL_COMMANDS = ('deploy', 'help', 'hotcopy', 'initenv', 'upgrade')
+
     def _do_product_admin(self, prefix, *args):
         mgr = self.product_admincmd_mgr(prefix)
-        if args and args[0] in ('deploy', 'hotcopy', 'initenv', 'upgrade'):
+        if args and args[0] in self.GLOBAL_COMMANDS:
             raise AdminCommandError('%s command not supported for products' %
                                     (args[0],))
         if args and args[0] == 'help':