Revision 9f395c32 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
1966 | 1966 |
|
1967 | 1967 |
dev.pci = int(free) |
1968 | 1968 |
|
1969 |
def HotplugSupported(self, instance, action, dev_type):
|
|
1970 |
"""Check if hotplug is supported.
|
|
1969 |
def VerifyHotplugSupport(self, instance, action, dev_type):
|
|
1970 |
"""Verifies that hotplug is supported.
|
|
1971 | 1971 |
|
1972 | 1972 |
Hotplug is *not* supported in case of: |
1973 | 1973 |
- qemu versions < 1.0 |
1974 | 1974 |
- security models and chroot (disk hotplug) |
1975 | 1975 |
- fdsend module is missing (nic hot-add) |
1976 | 1976 |
|
1977 |
@raise errors.HypervisorError: in previous cases |
|
1977 |
@raise errors.HypervisorError: in one of the previous cases
|
|
1978 | 1978 |
|
1979 | 1979 |
""" |
1980 | 1980 |
output = self._CallMonitorCommand(instance.name, self._INFO_VERSION_CMD) |
... | ... | |
2001 | 2001 |
action == constants.HOTPLUG_ACTION_ADD and not fdsend): |
2002 | 2002 |
raise errors.HotplugError("Cannot hot-add NIC." |
2003 | 2003 |
" fdsend python module is missing.") |
2004 |
return True |
|
2005 | 2004 |
|
2006 | 2005 |
def _CallHotplugCommand(self, name, cmd): |
2007 | 2006 |
output = self._CallMonitorCommand(name, cmd) |
Also available in: Unified diff