virt: refactor method compute_driver_matches
We only use method compute_driver_matches for checking if compute_driver equals 'xenapi.XenAPIDriver'. To be explicit, just rename it to is_xenapi. Change-Id: I2fb61491c4a321ab430f39476127412d8ee17c0d
This commit is contained in:
@@ -510,7 +510,7 @@ def instance_block_mapping(instance, bdms):
|
||||
root_device_name = instance['root_device_name']
|
||||
# NOTE(clayg): remove this when xenapi is setting default_root_device
|
||||
if root_device_name is None:
|
||||
if driver.compute_driver_matches('xenapi.XenAPIDriver'):
|
||||
if driver.is_xenapi():
|
||||
root_device_name = '/dev/xvda'
|
||||
else:
|
||||
return _DEFAULT_MAPPINGS
|
||||
|
||||
Reference in New Issue
Block a user