Revision 1fce5219 lib/mcpu.py
b/lib/mcpu.py | ||
---|---|---|
127 | 127 |
lu = lu_class(self, op, self.cfg, self.sstore) |
128 | 128 |
lu.CheckPrereq() |
129 | 129 |
hm = HooksMaster(rpc.call_hooks_runner, self, lu) |
130 |
hm.RunPhase(constants.HOOKS_PHASE_PRE) |
|
130 |
h_results = hm.RunPhase(constants.HOOKS_PHASE_PRE) |
|
131 |
lu.HooksCallBack(constants.HOOKS_PHASE_PRE, |
|
132 |
h_results, self._feedback_fn, None) |
|
131 | 133 |
try: |
132 | 134 |
result = lu.Exec(self._feedback_fn) |
133 |
hm.RunPhase(constants.HOOKS_PHASE_POST) |
|
135 |
h_results = hm.RunPhase(constants.HOOKS_PHASE_POST) |
|
136 |
result = lu.HooksCallBack(constants.HOOKS_PHASE_POST, |
|
137 |
h_results, self._feedback_fn, result) |
|
134 | 138 |
finally: |
135 | 139 |
if lu.cfg is not None: |
136 | 140 |
# we use lu.cfg and not self.cfg as for init cluster, self.cfg |
... | ... | |
166 | 170 |
lu.CheckPrereq() |
167 | 171 |
#if do_hooks: |
168 | 172 |
# hm = HooksMaster(rpc.call_hooks_runner, self, lu) |
169 |
# hm.RunPhase(constants.HOOKS_PHASE_PRE) |
|
173 |
# h_results = hm.RunPhase(constants.HOOKS_PHASE_PRE) |
|
174 |
# lu.HooksCallBack(constants.HOOKS_PHASE_PRE, |
|
175 |
# h_results, self._feedback_fn, None) |
|
170 | 176 |
result = lu.Exec(self._feedback_fn) |
171 | 177 |
#if do_hooks: |
172 |
# hm.RunPhase(constants.HOOKS_PHASE_POST) |
|
178 |
# h_results = hm.RunPhase(constants.HOOKS_PHASE_POST) |
|
179 |
# result = lu.HooksCallBack(constants.HOOKS_PHASE_POST, |
|
180 |
# h_results, self._feedback_fn, result) |
|
173 | 181 |
return result |
174 | 182 |
|
175 | 183 |
def LogStep(self, current, total, message): |
Also available in: Unified diff