Revision baa7f1d6 lib/storage/base.py

b/lib/storage/base.py
330 330
      ThrowError("Failed to parse blockdev output: %s", str(err))
331 331
    return sz
332 332

  
333
  def GetActualSpindles(self):
334
    """Return the actual number of spindles used.
335

  
336
    This is not supported by all devices; if not supported, C{None} is returned.
337

  
338
    @note: the device needs to be active when this is called
339

  
340
    """
341
    assert self.attached, "BlockDevice not attached in GetActualSpindles()"
342
    return None
343

  
344
  def GetActualDimensions(self):
345
    """Return the actual disk size and number of spindles used.
346

  
347
    @rtype: tuple
348
    @return: (size, spindles); spindles is C{None} when they are not supported
349

  
350
    @note: the device needs to be active when this is called
351

  
352
    """
353
    return (self.GetActualSize(), self.GetActualSpindles())
354

  
333 355
  def __repr__(self):
334 356
    return ("<%s: unique_id: %s, children: %s, %s:%s, %s>" %
335 357
            (self.__class__, self.unique_id, self._children,

Also available in: Unified diff