def __init__(self, context, cfg):
    self.context = context
    self._memcache = weakref.WeakValueDictionary()
    self._my_hostname = netutils.Hostname.GetSysName()

    # Get initial list of nodes
    self._nodes = dict((n.name, n.primary_ip)
                       for n in cfg.GetAllNodesInfo().values()
                       if n.master_candidate)

    # Remove master node
    self._nodes.pop(self._my_hostname, None)

    # Job dependencies
    self.depmgr = _JobDependencyManager(self._GetJobStatusForDependencies)
Constructor for JobQueue.
dataset/ETHPy150Open ganeti/ganeti/lib/jqueue/__init__.py/JobQueue.__init__