def NumberOfRestartAttempts(self, instance_name):
    idata = self._data["instance"]
    return idata.get(instance_name, {}).get(KEY_RESTART_COUNT, 0)
Returns number of previous restart attempts.
dataset/ETHPy150Open ganeti/ganeti/lib/watcher/state.py/WatcherState.NumberOfRestartAttempts