Deprecate 'use_direct_get' parameter

This is additional complexity that we don't want to support and won't be
able to support once everything in the cloud layer is switched over to
use the proxy layer. If users want control over this, they can use the
'get_xxx' methods in the proxy layer instead of the cloud layer.

Change-Id: I76e9e2873ad57db673516c2b66f9280f6b0280be
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2024-08-08 17:53:17 +01:00
parent a8cb501b0e
commit e11bb7c3c0
2 changed files with 10 additions and 3 deletions

View File

@ -34,6 +34,7 @@ from openstack import exceptions
from openstack import proxy from openstack import proxy
from openstack import resource from openstack import resource
from openstack import utils from openstack import utils
from openstack import warnings as os_warnings
class _OpenStackCloudMixin(_services_mixin.ServicesMixin): class _OpenStackCloudMixin(_services_mixin.ServicesMixin):
@ -68,7 +69,7 @@ class _OpenStackCloudMixin(_services_mixin.ServicesMixin):
app_version=None, app_version=None,
extra_services=None, extra_services=None,
strict=False, strict=False,
use_direct_get=False, use_direct_get=None,
task_manager=None, task_manager=None,
rate_limit=None, rate_limit=None,
oslo_conf=None, oslo_conf=None,
@ -155,6 +156,12 @@ class _OpenStackCloudMixin(_services_mixin.ServicesMixin):
""" """
super().__init__() super().__init__()
if use_direct_get is not None:
warnings.warn(
"The 'use_direct_get' argument is deprecated for removal",
os_warnings.RemovedInSDK50Warning,
)
self.config = config self.config = config
self._extra_services = {} self._extra_services = {}
self._strict_proxies = strict_proxies self._strict_proxies = strict_proxies
@ -196,7 +203,7 @@ class _OpenStackCloudMixin(_services_mixin.ServicesMixin):
self._proxies = {} self._proxies = {}
self.__pool_executor = pool_executor self.__pool_executor = pool_executor
self._global_request_id = global_request_id self._global_request_id = global_request_id
self.use_direct_get = use_direct_get self.use_direct_get = use_direct_get or False
self.strict_mode = strict self.strict_mode = strict
self.log = _log.setup_logging('openstack') self.log = _log.setup_logging('openstack')

View File

@ -362,7 +362,7 @@ class Connection(
app_version=None, app_version=None,
extra_services=None, extra_services=None,
strict=False, strict=False,
use_direct_get=False, use_direct_get=None,
task_manager=None, task_manager=None,
rate_limit=None, rate_limit=None,
oslo_conf=None, oslo_conf=None,