def _GetInstOperState(ctx, inst):
  # Can't use RS_OFFLINE here as it would describe the instance to
  # be offline when we actually don't know due to missing data
  if inst.primary_node in ctx.bad_nodes:
    return _FS_NODATA
  else:
    return bool(ctx.live_data.get(inst.uuid))
Get instance's operational status.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetInstOperState