compute utils: Remove a useless context parameter
get_device_name_for_instance used to require a context to be passed in explicitly, but this is no longer required, so this patch removes it from the signature. Change-Id: I076c377199ce3d17541a772544dfb4d9bc4df2e9
This commit is contained in:
parent
efcbd99493
commit
51bdf76b50
@ -4398,7 +4398,7 @@ class ComputeManager(manager.Manager):
|
||||
context, instance.uuid))
|
||||
|
||||
device_name = compute_utils.get_device_name_for_instance(
|
||||
context, instance, bdms, device)
|
||||
instance, bdms, device)
|
||||
|
||||
# NOTE(vish): create bdm here to avoid race condition
|
||||
bdm = objects.BlockDeviceMapping(
|
||||
|
@ -92,7 +92,7 @@ def add_instance_fault_from_exc(context, instance, fault, exc_info=None):
|
||||
fault_obj.create()
|
||||
|
||||
|
||||
def get_device_name_for_instance(context, instance, bdms, device):
|
||||
def get_device_name_for_instance(instance, bdms, device):
|
||||
"""Validates (or generates) a device name for instance.
|
||||
|
||||
This method is a wrapper for get_next_device_name that gets the list
|
||||
|
@ -104,7 +104,7 @@ class ComputeValidateDeviceTestCase(test.NoDBTestCase):
|
||||
bdms = objects.BlockDeviceMappingList.get_by_instance_uuid(
|
||||
self.context, self.instance['uuid'])
|
||||
return compute_utils.get_device_name_for_instance(
|
||||
self.context, self.instance, bdms, device)
|
||||
self.instance, bdms, device)
|
||||
|
||||
@staticmethod
|
||||
def _fake_bdm(device):
|
||||
|
Loading…
x
Reference in New Issue
Block a user