Revision 880478f8 lib/config.py

b/lib/config.py
516 516
    self._OpenConfig()
517 517
    self._ReleaseLock()
518 518
    return self._config_data.cluster.mac_prefix
519

  
520
  def GetMaster(self):
521
    """Get the name of the master.
522

  
523
    """
524
    self._OpenConfig()
525
    self._ReleaseLock()
526
    return self._config_data.cluster.master_node
527

  
528
  def SetMaster(self, master_node):
529
    """Change the master of the cluster.
530

  
531
    As with all changes, the configuration data will be distributed to
532
    all nodes.
533

  
534
    This function is used for manual master failover.
535

  
536
    """
537
    self._OpenConfig()
538
    self._config_data.cluster.master_node = master_node
539
    self._WriteConfig()
540
    self._ReleaseLock()

Also available in: Unified diff