NFS: Use Volume attr instead of dict compat for lock

Use Volume.id instead of volume[id].

Change-Id: I951179c3abb5b4a40d2ae08765e2a1055f1975c2
This commit is contained in:
Eric Harney
2022-07-18 15:51:18 -04:00
parent 4754451138
commit d402c6fbab

View File

@@ -536,13 +536,13 @@ class NfsDriver(remotefs.RemoteFSSnapDriverDistributed):
self._stats = data
@coordination.synchronized('{self.driver_prefix}-{volume[id]}')
@coordination.synchronized('{self.driver_prefix}-{volume.id}')
def create_volume(self, volume):
"""Apply locking to the create volume operation."""
return super(NfsDriver, self).create_volume(volume)
@coordination.synchronized('{self.driver_prefix}-{volume[id]}')
@coordination.synchronized('{self.driver_prefix}-{volume.id}')
def delete_volume(self, volume):
"""Deletes a logical volume."""