Revision d8470559 daemons/ganeti-masterd

b/daemons/ganeti-masterd
284 284
    assert self.__class__._instance is None, "Attempt to modify Ganeti Context"
285 285
    object.__setattr__(self, name, value)
286 286

  
287
  def AddNode(self, node):
288
    """Adds a node to the configuration and lock manager.
289

  
290
    """
291
    # Add it to the configuration
292
    self.cfg.AddNode(node)
293

  
294
    # Add the new node to the Ganeti Lock Manager
295
    self.glm.add(locking.LEVEL_NODE, node.name)
296

  
297
  def ReaddNode(self, node):
298
    """Updates a node that's already in the configuration
299

  
300
    """
301

  
302
  def RemoveNode(self, name):
303
    """Removes a node from the configuration and lock manager.
304

  
305
    """
306
    # Remove node from configuration
307
    self.cfg.RemoveNode(name)
308

  
309
    # Remove the node from the Ganeti Lock Manager
310
    self.glm.remove(locking.LEVEL_NODE, name)
311

  
287 312

  
288 313
def ParseOptions():
289 314
  """Parse the command line options.

Also available in: Unified diff