Revision 880478f8 lib/ssconf.py

b/lib/ssconf.py
57 57
  _SS_FILEPREFIX = "ssconf_"
58 58
  SS_HYPERVISOR = "hypervisor"
59 59
  SS_NODED_PASS = "node_pass"
60
  _VALID_KEYS = (SS_HYPERVISOR, SS_NODED_PASS,)
60
  SS_MASTER_NODE = "master_node"
61
  SS_MASTER_IP = "master_ip"
62
  SS_MASTER_NETDEV = "master_netdev"
63
  _VALID_KEYS = (SS_HYPERVISOR, SS_NODED_PASS, SS_MASTER_NODE, SS_MASTER_IP,
64
                 SS_MASTER_NETDEV)
61 65
  _MAX_SIZE = 4096
62 66

  
63 67
  def __init__(self, cfg_location=None):
......
128 132
    """
129 133
    return self._ReadFile(self.SS_NODED_PASS)
130 134

  
135
  def GetMasterNode(self):
136
    """Get the hostname of the master node for this cluster.
137

  
138
    """
139
    return self._ReadFile(self.SS_MASTER_NODE)
140

  
141
  def GetMasterIP(self):
142
    """Get the IP of the master node for this cluster.
143

  
144
    """
145
    return self._ReadFile(self.SS_MASTER_IP)
146

  
147
  def GetMasterNetdev(self):
148
    """Get the netdev to which we'll add the master ip.
149

  
150
    """
151
    return self._ReadFile(self.SS_MASTER_NETDEV)
152

  
131 153
  def SetKey(self, key, value):
132 154
    """Set the value of a key.
133 155

  

Also available in: Unified diff