Revision fc1dc9d7 lib/objects.py

b/lib/objects.py
338 338
      return "/dev/%s/%s" % (self.logical_id[0], self.logical_id[1])
339 339
    return None
340 340

  
341
  def ChildrenNeeded(self):
342
    """Compute the needed number of children for activation.
343

  
344
    This method will return either -1 (all children) or a positive
345
    number denoting the minimum number of children needed for
346
    activation (only mirrored devices will usually return >=0).
347

  
348
    Currently, only DRBD8 supports diskless activation (therefore we
349
    return 0), for all other we keep the previous semantics and return
350
    -1.
351

  
352
    """
353
    if self.dev_type == constants.LD_DRBD8:
354
      return 0
355
    return -1
356

  
341 357
  def GetNodes(self, node):
342 358
    """This function returns the nodes this device lives on.
343 359

  

Also available in: Unified diff