fup: Add missing docstrings from get_rescue_device|bus diskinfo funcs
As requested in I0e1241ae691afd2af12ef15706c454c05d9f932c this simply adds some missing docstrings. Change-Id: I100584bde61cc3bc8fda06f0ff2b2c6afd1c3d61
This commit is contained in:
parent
7970deddd7
commit
b2d48d440a
|
@ -746,7 +746,14 @@ def get_boot_order(disk_info):
|
|||
|
||||
|
||||
def get_rescue_device(rescue_image_meta):
|
||||
# Find and validate the hw_rescue_device rescue device
|
||||
"""Find and validate the rescue device
|
||||
|
||||
:param rescue_image_meta: ImageMeta object provided when rescuing
|
||||
|
||||
:raises: UnsupportedRescueDevice if the requested device type is not
|
||||
supported
|
||||
:returns: A valid device type to be used during the rescue
|
||||
"""
|
||||
rescue_device = rescue_image_meta.properties.get("hw_rescue_device",
|
||||
"disk")
|
||||
if rescue_device not in SUPPORTED_DEVICE_TYPES:
|
||||
|
@ -755,7 +762,17 @@ def get_rescue_device(rescue_image_meta):
|
|||
|
||||
|
||||
def get_rescue_bus(instance, virt_type, rescue_image_meta, rescue_device):
|
||||
# Find and validate the hw_rescue_bus
|
||||
"""Find and validate the rescue bus
|
||||
|
||||
:param instance: The instance to be rescued
|
||||
:param virt_type: The hypervisor the instance will run on
|
||||
:param rescue_image_meta: ImageMeta object provided when rescuing
|
||||
:param rescue_device: The rescue device being used
|
||||
|
||||
:raises: UnsupportedRescueBus if the requested bus is not
|
||||
supported by the hypervisor
|
||||
:returns: A valid device bus given virt_type and rescue device
|
||||
"""
|
||||
rescue_bus = rescue_image_meta.properties.get("hw_rescue_bus")
|
||||
if rescue_bus is not None:
|
||||
if is_disk_bus_valid_for_virt(virt_type, rescue_bus):
|
||||
|
|
Loading…
Reference in New Issue