def _GetNodeRole(node, master_uuid):
  if node.uuid == master_uuid:
    return constants.NR_MASTER
  elif node.master_candidate:
    return constants.NR_MCANDIDATE
  elif node.drained:
    return constants.NR_DRAINED
  elif node.offline:
    return constants.NR_OFFLINE
  else:
    return constants.NR_REGULAR
Builds list of fields for extstorage provider queries.
dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_GetNodeRole--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/query.py/_BuildExtStorageFields