Revision 7299e960 lib/hypervisor/hv_base.py

b/lib/hypervisor/hv_base.py
564 564
    else:
565 565
      return None
566 566

  
567
  # pylint: disable=R0201,W0613
567 568
  def HotAddDevice(self, instance, dev_type, device, extra, seq):
568 569
    """Hot-add a device.
569 570

  
570 571
    """
571
    pass
572
    raise errors.HotplugError("Hotplug is not supported by this hypervisor")
572 573

  
574
  # pylint: disable=R0201,W0613
573 575
  def HotDelDevice(self, instance, dev_type, device, extra, seq):
574 576
    """Hot-del a device.
575 577

  
576 578
    """
577
    pass
579
    raise errors.HotplugError("Hotplug is not supported by this hypervisor")
578 580

  
581
  # pylint: disable=R0201,W0613
579 582
  def HotModDevice(self, instance, dev_type, device, extra, seq):
580 583
    """Hot-mod a device.
581 584

  
582 585
    """
583
    pass
586
    raise errors.HotplugError("Hotplug is not supported by this hypervisor")
584 587

  
585
  def HotplugSupported(self, instance, action, dev_type):
588
  # pylint: disable=R0201,W0613
589
  def VerifyHotplugSupport(self, instance, action, dev_type):
586 590
    """Whether hotplug is supported.
587 591

  
588
    Depends on instance's hvparam, the action. and the dev_type
592
    Hotplug is not supported by default. If a hypervisor wants to support
593
    it it should override this method.
594

  
595
    @type instance: L{objects.Instance}
596
    @param instance: the instance object
597
    @type action: string
598
    @param action: one of the supported hotplug commands
599
    @type dev_type: string
600
    @param dev_type: one of the supported device types to hotplug
601
    @raise errors.HotplugError: when a parameter is not valid
602

  
589 603
    """
590
    raise NotImplementedError
604
    raise errors.HotplugError("Hotplug is not supported by this hypervisor")

Also available in: Unified diff