Revision e843991b lib/ssconf.py

b/lib/ssconf.py
131 131
  def GetClusterSerialNo(self):
132 132
    return self._config_data["cluster"]["serial_no"]
133 133

  
134
  def GetNodeStatusFlags(self, node):
135
    """Get a node's status flags
136

  
137
    @type node: string
138
    @param node: node name
139
    @rtype: (bool, bool, bool)
140
    @return: (master_candidate, drained, offline) (or None if no such node)
141

  
142
    """
143
    if node not in self._config_data["nodes"]:
144
      return None
145

  
146
    master_candidate = self._config_data["nodes"][node]["master_candidate"]
147
    drained = self._config_data["nodes"][node]["drained"]
148
    offline = self._config_data["nodes"][node]["offline"]
149
    return master_candidate, drained, offline
150

  
134 151

  
135 152
class SimpleStore(object):
136 153
  """Interface to static cluster data.

Also available in: Unified diff