From 520ec0b79b74ac06bdf5a7f97c51eb47e9409232 Mon Sep 17 00:00:00 2001 From: Douglas Viroel Date: Sat, 7 Jun 2025 11:33:28 -0300 Subject: [PATCH] Add warning message for experimental integrations Some services integrations are now classified as experimental and a warning message will now appear once a client is created for them. These integrations are not fully tested in CI and miss a documentation on how they work or should be used. A release note was added to inform users about the status of these integrations and related features. Change-Id: Ib7d0ac0b3e187ae239dfa075fb53a6c0107dff29 --- ...imental-integrations-490d4cc32444288d.yaml | 6 ++++ watcher/common/clients.py | 35 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 releasenotes/notes/experimental-integrations-490d4cc32444288d.yaml diff --git a/releasenotes/notes/experimental-integrations-490d4cc32444288d.yaml b/releasenotes/notes/experimental-integrations-490d4cc32444288d.yaml new file mode 100644 index 000000000..f571d1373 --- /dev/null +++ b/releasenotes/notes/experimental-integrations-490d4cc32444288d.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Glance, Ironic, MAAS, and Neutron integrations with Watcher are now marked + as Experimental and may be deprecated in a future release. These + integrations have not been tested recently and may not be fully stable. diff --git a/watcher/common/clients.py b/watcher/common/clients.py index 595ae0979..9838123c1 100644 --- a/watcher/common/clients.py +++ b/watcher/common/clients.py @@ -10,7 +10,9 @@ # License for the specific language governing permissions and limitations # under the License. +import debtcollector from oslo_config import cfg +import warnings from cinderclient import client as ciclient from glanceclient import client as glclient @@ -43,6 +45,8 @@ _CLIENTS_AUTH_GROUP = 'watcher_clients_auth' # for at least one release before raising the minimum required version. MIN_NOVA_API_VERSION = '2.56' +warnings.simplefilter("once") + def check_min_nova_api_version(config_version): """Validates the minimum required nova API version. @@ -135,6 +139,13 @@ class OpenStackClients(object): if self._glance: return self._glance + # NOTE(dviroel): This integration is classified as Experimental due to + # the lack of documentation and CI testing. It can be marked as + # supported or deprecated in future releases, based on improvements. + debtcollector.deprecate( + ("Glance is an experimental integration and may be " + "deprecated in future releases."), + version="2025.2", category=PendingDeprecationWarning) glanceclient_version = self._get_client_option('glance', 'api_version') glance_endpoint_type = self._get_client_option('glance', 'endpoint_type') @@ -221,6 +232,14 @@ class OpenStackClients(object): if self._neutron: return self._neutron + # NOTE(dviroel): This integration is classified as Experimental due to + # the lack of documentation and CI testing. It can be marked as + # supported or deprecated in future releases, based on improvements. + debtcollector.deprecate( + ("Neutron is an experimental integration and may be " + "deprecated in future releases."), + version="2025.2", category=PendingDeprecationWarning) + neutronclient_version = self._get_client_option('neutron', 'api_version') neutron_endpoint_type = self._get_client_option('neutron', @@ -239,6 +258,14 @@ class OpenStackClients(object): if self._ironic: return self._ironic + # NOTE(dviroel): This integration is classified as Experimental due to + # the lack of documentation and CI testing. It can be marked as + # supported or deprecated in future releases, based on improvements. + debtcollector.deprecate( + ("Ironic is an experimental integration and may be " + "deprecated in future releases."), + version="2025.2", category=PendingDeprecationWarning) + ironicclient_version = self._get_client_option('ironic', 'api_version') endpoint_type = self._get_client_option('ironic', 'endpoint_type') ironic_region_name = self._get_client_option('ironic', 'region_name') @@ -252,6 +279,14 @@ class OpenStackClients(object): if self._maas: return self._maas + # NOTE(dviroel): This integration is classified as Experimental due to + # the lack of documentation and CI testing. It can be marked as + # supported or deprecated in future releases, based on improvements. + debtcollector.deprecate( + ("MAAS is an experimental integration and may be " + "deprecated in future releases."), + version="2025.2", category=PendingDeprecationWarning) + if not maas_client: raise exception.UnsupportedError( "MAAS client unavailable. Please install python-libmaas.")