Merge "Add check_multiattach to Local volume driver"
This commit is contained in:
commit
3fcebdabbf
@ -1019,7 +1019,8 @@ class DockerDriver(driver.ContainerDriver):
|
||||
return volume_driver.get_volume_status(context, volume_mapping)
|
||||
|
||||
def check_multiattach(self, context, volume_mapping):
|
||||
return self.volume_driver.check_multiattach(context, volume_mapping)
|
||||
volume_driver = self._get_volume_driver(volume_mapping)
|
||||
return volume_driver.check_multiattach(context, volume_mapping)
|
||||
|
||||
def _get_or_create_docker_network(self, context, network_api,
|
||||
neutron_net_id):
|
||||
|
@ -82,6 +82,9 @@ class VolumeDriver(object):
|
||||
def get_volume_status(self, *args, **kwargs):
|
||||
raise NotImplementedError()
|
||||
|
||||
def check_multiattach(self, context, volume):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class Local(VolumeDriver):
|
||||
|
||||
@ -117,6 +120,10 @@ class Local(VolumeDriver):
|
||||
def get_volume_status(self, context, volume):
|
||||
return 'available'
|
||||
|
||||
@validate_volume_provider(supported_providers)
|
||||
def check_multiattach(self, context, volume):
|
||||
return False
|
||||
|
||||
|
||||
class Cinder(VolumeDriver):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user