HooksMaster: Make RunPhase return the rpc output
[ganeti-local] / lib / mcpu.py
index 8022829..228465b 100644 (file)
@@ -74,12 +74,13 @@ class Processor(object):
     opcodes.OpConnectConsole: cmdlib.LUConnectConsole,
     opcodes.OpQueryInstances: cmdlib.LUQueryInstances,
     opcodes.OpQueryInstanceData: cmdlib.LUQueryInstanceData,
-    opcodes.OpSetInstanceParms: cmdlib.LUSetInstanceParms,
+    opcodes.OpSetInstanceParams: cmdlib.LUSetInstanceParams,
     # os lu
     opcodes.OpDiagnoseOS: cmdlib.LUDiagnoseOS,
     # exports lu
     opcodes.OpQueryExports: cmdlib.LUQueryExports,
     opcodes.OpExportInstance: cmdlib.LUExportInstance,
+    opcodes.OpRemoveExport: cmdlib.LURemoveExport,
     # tags lu
     opcodes.OpGetTags: cmdlib.LUGetTags,
     opcodes.OpSearchTags: cmdlib.LUSearchTags,
@@ -87,6 +88,7 @@ class Processor(object):
     opcodes.OpDelTags: cmdlib.LUDelTags,
     # test lu
     opcodes.OpTestDelay: cmdlib.LUTestDelay,
+    opcodes.OpTestAllocator: cmdlib.LUTestAllocator,
     }
 
   def __init__(self, feedback=None):
@@ -262,6 +264,12 @@ class HooksMaster(object):
 
     This is the main function of the HookMaster.
 
+    Args:
+      phase: the hooks phase to run
+
+    Returns:
+      the result of the hooks multi-node rpc call
+
     """
     if not self.node_list[phase]:
       # empty node list, we should not attempt to run this as either
@@ -285,6 +293,7 @@ class HooksMaster(object):
             errs.append((node_name, script, output))
       if errs:
         raise errors.HooksAbort(errs)
+    return results
 
   def RunConfigUpdate(self):
     """Run the special configuration update hook