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

    # check bridges existence
    CheckInstanceBridgesExist(self, self.instance)
Check prerequisites.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/instance_operation.py/LUInstanceReboot.CheckPrereq