guest.py (nova-22.0.0) | : | guest.py (nova-22.0.1) | ||
---|---|---|---|---|
skipping to change at line 369 | skipping to change at line 369 | |||
return [] | return [] | |||
devs = [] | devs = [] | |||
for dev in config.devices: | for dev in config.devices: | |||
if (devtype is None or | if (devtype is None or | |||
isinstance(dev, devtype)): | isinstance(dev, devtype)): | |||
devs.append(dev) | devs.append(dev) | |||
return devs | return devs | |||
def detach_device_with_retry(self, get_device_conf_func, device, live, | def detach_device_with_retry(self, get_device_conf_func, device, live, | |||
max_retry_count=7, inc_sleep_time=2, | max_retry_count=7, inc_sleep_time=10, | |||
max_sleep_time=30, | max_sleep_time=60, | |||
alternative_device_name=None, | alternative_device_name=None, | |||
supports_device_missing_error_code=False): | supports_device_missing_error_code=False): | |||
"""Detaches a device from the guest. After the initial detach request, | """Detaches a device from the guest. After the initial detach request, | |||
a function is returned which can be used to ensure the device is | a function is returned which can be used to ensure the device is | |||
successfully removed from the guest domain (retrying the removal as | successfully removed from the guest domain (retrying the removal as | |||
necessary). | necessary). | |||
:param get_device_conf_func: function which takes device as a parameter | :param get_device_conf_func: function which takes device as a parameter | |||
and returns the configuration for device | and returns the configuration for device | |||
:param device: device to detach | :param device: device to detach | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |