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
This commit is contained in:
@@ -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.
|
@@ -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.")
|
||||
|
Reference in New Issue
Block a user