def CheckPrereq(self):
    self.instance = self.cfg.GetInstanceInfoByName(self.op.instance_name)
    assert self.instance is not None, \
          "Cannot retrieve locked instance %s" % self.op.instance_name
    CheckNodeOnline(self, self.instance.primary_node)

    self._cds = GetClusterDomainSecret()
Check prerequisites.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/backup.py/LUBackupPrepare.CheckPrereq