Merge "Deprecate Consul driver"

This commit is contained in:
Zuul
2026-02-18 16:00:53 +00:00
committed by Gerrit Code Review
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
deprecations:
- |
The consul driver has been deprecated, due to the archivement of
the python-consul2 library.

View File

@@ -15,6 +15,7 @@
import contextlib
import functools
import warnings
import consul
from oslo_utils import encodeutils
@@ -222,6 +223,12 @@ class ConsulDriver(
def __init__(self, member_id, parsed_url, options):
super().__init__(member_id, parsed_url, options)
warnings.warn(
'Consul driver is deprecated and will be removed in '
'a future release',
category=DeprecationWarning,
stacklevel=2,
)
options = utils.collapse(options)
self._host = parsed_url.hostname
self._port = parsed_url.port or self.DEFAULT_PORT