Revision 790d491c lib/backend.py
b/lib/backend.py | ||
---|---|---|
1869 | 1869 |
except Exception, err: # pylint: disable=W0703 |
1870 | 1870 |
_Fail("Failed to get migration status: %s", err, exc=True) |
1871 | 1871 |
|
1872 |
def HotplugDevice(instance, action, dev_type, device, extra, seq): |
|
1873 |
"""Hotplug a device |
|
1874 |
|
|
1875 |
""" |
|
1876 |
hyper = hypervisor.GetHypervisor(instance.hypervisor) |
|
1877 |
try: |
|
1878 |
getattr(hyper, "HotplugDevice") |
|
1879 |
except NameError: |
|
1880 |
_Fail("Hotplug is not supported for %s hypervisor", |
|
1881 |
instance.hypervisor, exc=True ) |
|
1882 |
return hyper.HotplugDevice(instance, action, dev_type, device, extra, seq) |
|
1872 | 1883 |
|
1873 | 1884 |
def BlockdevCreate(disk, size, owner, on_primary, info, excl_stor): |
1874 | 1885 |
"""Creates a block device for an instance. |
Also available in: Unified diff