Drop support for Block Storage API v2

... because it was already removed from cinder[1].

[1] e05b261af7dcd24096b229860df65dff1d385910

Change-Id: I8baf1701483ce2addd47dd4cb472f92ad4a192cd
This commit is contained in:
Takashi Kajinami 2021-07-25 02:17:08 +09:00
parent 77bde0120b
commit 271156446f
3 changed files with 7 additions and 10 deletions

View File

@ -65,7 +65,7 @@ service_opts = [
cfg.StrOpt('region_name_for_shared_services', cfg.StrOpt('region_name_for_shared_services',
help=_('Region name for shared services endpoints.')), help=_('Region name for shared services endpoints.')),
cfg.ListOpt('shared_services_types', cfg.ListOpt('shared_services_types',
default=['image', 'volume', 'volumev2', 'volumev3'], default=['image', 'volume', 'volumev3'],
help=_('The shared services located in the other region.' help=_('The shared services located in the other region.'
'Needs region_name_for_shared_services option to ' 'Needs region_name_for_shared_services option to '
'be set for this to take effect.')), 'be set for this to take effect.')),

View File

@ -34,7 +34,7 @@ class CinderClientPlugin(os_client.ExtensionMixin,
exceptions_module = exceptions exceptions_module = exceptions
service_types = [VOLUME_V2, VOLUME_V3] = ['volumev2', 'volumev3'] service_types = [VOLUME_V3] = ['volumev3']
def get_volume_api_version(self): def get_volume_api_version(self):
'''Returns the most recent API version.''' '''Returns the most recent API version.'''
@ -45,13 +45,6 @@ class CinderClientPlugin(os_client.ExtensionMixin,
interface=self.interface) interface=self.interface)
self.service_type = self.VOLUME_V3 self.service_type = self.VOLUME_V3
self.client_version = '3' self.client_version = '3'
except ks_exceptions.EndpointNotFound:
try:
self.context.keystone_session.get_endpoint(
service_type=self.VOLUME_V2,
interface=self.interface)
self.service_type = self.VOLUME_V2
self.client_version = '2'
except ks_exceptions.EndpointNotFound: except ks_exceptions.EndpointNotFound:
raise exception.Error(_('No volume service available.')) raise exception.Error(_('No volume service available.'))

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for Block Storage API v2 has been removed.