Revision 61a980a9 lib/query.py

b/lib/query.py
779 779

  
780 780
  """
781 781
  if inst.primary_node in ctx.offline_nodes:
782
    return "ERROR_nodeoffline"
782
    return constants.INSTST_NODEOFFLINE
783 783

  
784 784
  if inst.primary_node in ctx.bad_nodes:
785
    return "ERROR_nodedown"
785
    return constants.INSTST_NODEDOWN
786 786

  
787 787
  if bool(ctx.live_data.get(inst.name)):
788 788
    if inst.name in ctx.wrongnode_inst:
789
      return "ERROR_wrongnode"
789
      return constants.INSTST_WRONGNODE
790 790
    elif inst.admin_up:
791
      return "running"
791
      return constants.INSTST_RUNNING
792 792
    else:
793
      return "ERROR_up"
793
      return constants.INSTST_ERRORUP
794 794

  
795 795
  if inst.admin_up:
796
    return "ERROR_down"
796
    return constants.INSTST_ERRORDOWN
797 797

  
798
  return "ADMIN_down"
798
  return constants.INSTST_ADMINDOWN
799 799

  
800 800

  
801 801
def _GetInstDiskSize(index):

Also available in: Unified diff