Revision 87b3cb26

b/lib/mcpu.py
35 35
from ganeti import opcodes
36 36
from ganeti import constants
37 37
from ganeti import errors
38
from ganeti import rpc
39 38
from ganeti import cmdlib
40 39
from ganeti import locking
41 40
from ganeti import utils
......
188 187
    self.context = context
189 188
    self._ec_id = ec_id
190 189
    self._cbs = None
191
    self.rpc = rpc.RpcRunner(context.cfg)
190
    self.rpc = context.rpc
192 191
    self.hmclass = HooksMaster
193 192

  
194 193
  def _AcquireLocks(self, level, names, shared, timeout, priority):
b/lib/rpc.py
414 414

  
415 415

  
416 416
class RpcRunner(object):
417
  """RPC runner class"""
417
  """RPC runner class.
418 418

  
419
  def __init__(self, cfg):
420
    """Initialized the rpc runner.
419
  """
420
  def __init__(self, context):
421
    """Initialized the RPC runner.
421 422

  
422
    @type cfg:  C{config.ConfigWriter}
423
    @param cfg: the configuration object that will be used to get data
424
                about the cluster
423
    @type context: C{masterd.GanetiContext}
424
    @param context: Ganeti context
425 425

  
426 426
    """
427
    self._cfg = cfg
427
    self._cfg = context.cfg
428 428
    self.port = netutils.GetDaemonPort(constants.NODED)
429 429

  
430 430
  def _InstDict(self, instance, hvp=None, bep=None, osp=None):
b/lib/server/masterd.py
399 399
    # Job queue
400 400
    self.jobqueue = jqueue.JobQueue(self)
401 401

  
402
    # RPC runner
403
    self.rpc = rpc.RpcRunner(self)
404

  
402 405
    # setting this also locks the class against attribute modifications
403 406
    self.__class__._instance = self
404 407

  

Also available in: Unified diff