Revision adfa97e3 lib/mcpu.py
b/lib/mcpu.py | ||
---|---|---|
222 | 222 |
opcodes.OpTestAllocator: cmdlib.LUTestAllocator, |
223 | 223 |
} |
224 | 224 |
|
225 |
def __init__(self, context): |
|
225 |
def __init__(self, context, ec_id):
|
|
226 | 226 |
"""Constructor for Processor |
227 | 227 |
|
228 |
@type context: GanetiContext |
|
229 |
@param context: global Ganeti context |
|
230 |
@type ec_id: string |
|
231 |
@param ec_id: execution context identifier |
|
232 |
|
|
228 | 233 |
""" |
229 | 234 |
self.context = context |
235 |
self._ec_id = ec_id |
|
230 | 236 |
self._cbs = None |
231 | 237 |
self.rpc = rpc.RpcRunner(context.cfg) |
232 | 238 |
self.hmclass = HooksMaster |
... | ... | |
501 | 507 |
logging.info(message) |
502 | 508 |
self._Feedback(" - INFO: %s" % message) |
503 | 509 |
|
510 |
def GetECId(self): |
|
511 |
if not self._ec_id: |
|
512 |
errors.ProgrammerError("Tried to use execution context id when not set") |
|
513 |
return self._ec_id |
|
514 |
|
|
504 | 515 |
|
505 | 516 |
class HooksMaster(object): |
506 | 517 |
"""Hooks master. |
Also available in: Unified diff