From d10f6ca32fd9dfe5100cb54531adb4bba866edf8 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 23 Sep 2021 23:00:55 +0900 Subject: [PATCH] Deprecate GenericHardwareDeclarativePollster This pollster was designed to be used in a TripleO deployment, to gather hardware metrics from overcloud nodes. However in current TripleO deployment Telemetry services are no longer deployed in undercloud thus this pollster is useless. Change-Id: Ic7d6b0adbbe9b33bc9421add849c49cf7ef823e0 --- ceilometer/hardware/discovery.py | 13 +++++++++++++ ceilometer/hardware/pollsters/generic.py | 6 ++++++ ...dware-declarative-pollstar-dfa418bf6a5e0459.yaml | 13 +++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 releasenotes/notes/deprecate-generic-hardware-declarative-pollstar-dfa418bf6a5e0459.yaml diff --git a/ceilometer/hardware/discovery.py b/ceilometer/hardware/discovery.py index f4113efd7b..b3c38f0753 100644 --- a/ceilometer/hardware/discovery.py +++ b/ceilometer/hardware/discovery.py @@ -12,6 +12,8 @@ # License for the specific language governing permissions and limitations # under the License. +import warnings + from oslo_config import cfg from oslo_log import log from oslo_utils import timeutils @@ -24,29 +26,36 @@ LOG = log.getLogger(__name__) OPTS = [ cfg.StrOpt('url_scheme', default='snmp://', + deprecated_for_removal=True, help='URL scheme to use for hardware nodes.'), cfg.StrOpt('readonly_user_name', default='ro_snmp_user', + deprecated_for_removal=True, help='SNMPd user name of all nodes running in the cloud.'), cfg.StrOpt('readonly_user_password', default='password', + deprecated_for_removal=True, help='SNMPd v3 authentication password of all the nodes ' 'running in the cloud.', secret=True), cfg.StrOpt('readonly_user_auth_proto', choices=['md5', 'sha'], + deprecated_for_removal=True, help='SNMPd v3 authentication algorithm of all the nodes ' 'running in the cloud'), cfg.StrOpt('readonly_user_priv_proto', choices=['des', 'aes128', '3des', 'aes192', 'aes256'], + deprecated_for_removal=True, help='SNMPd v3 encryption algorithm of all the nodes ' 'running in the cloud'), cfg.StrOpt('readonly_user_priv_password', + deprecated_for_removal=True, help='SNMPd v3 encryption password of all the nodes ' 'running in the cloud.', secret=True), cfg.StrOpt('tripleo_network_name', default='ctlplane', + deprecated_for_removal=True, help='Name of the control plane Tripleo network') ] @@ -58,6 +67,10 @@ class NodesDiscoveryTripleO(plugin_base.DiscoveryBase): self.last_run = None self.instances = {} + warnings.warn('GenericHardwareDeclarativePollster has been deprecated ' + 'and will be removed in a future release.', + category=DeprecationWarning, stacklevel=3) + def _make_resource_url(self, ip): hwconf = self.conf.hardware url = hwconf.url_scheme diff --git a/ceilometer/hardware/pollsters/generic.py b/ceilometer/hardware/pollsters/generic.py index dd8d09f058..c94bca04a6 100644 --- a/ceilometer/hardware/pollsters/generic.py +++ b/ceilometer/hardware/pollsters/generic.py @@ -15,6 +15,7 @@ import itertools import pkg_resources +import warnings from oslo_config import cfg from oslo_log import log @@ -30,6 +31,7 @@ from ceilometer import sample OPTS = [ cfg.StrOpt('meter_definitions_file', default="snmp.yaml", + deprecated_for_removal=True, help="Configuration file for defining hardware snmp meters." ), ] @@ -66,6 +68,10 @@ class GenericHardwareDeclarativePollster(plugin_base.PollsterBase): super(GenericHardwareDeclarativePollster, self).__init__(conf) self.inspectors = {} + warnings.warn('GenericHardwareDeclarativePollster has been deprecated ' + 'and will be removed in a future release.', + category=DeprecationWarning, stacklevel=3) + def _update_meter_definition(self, definition): self.meter_definition = definition self.cached_inspector_params = {} diff --git a/releasenotes/notes/deprecate-generic-hardware-declarative-pollstar-dfa418bf6a5e0459.yaml b/releasenotes/notes/deprecate-generic-hardware-declarative-pollstar-dfa418bf6a5e0459.yaml new file mode 100644 index 0000000000..56cb652348 --- /dev/null +++ b/releasenotes/notes/deprecate-generic-hardware-declarative-pollstar-dfa418bf6a5e0459.yaml @@ -0,0 +1,13 @@ +--- +deprecations: + - | + ``GenericHardwareDeclarativePollster`` has been deprecated and will be + removed in a future release. This pollster was designed to be used in + TripleO deployment to gather hardware metrics from overcloud nodes but + Telemetry services are no longer deployed in undercloud in current TripleO. + + - | + The ``NodesDiscoveryTripleO`` discovery plugin has been deprecated and + will be removed in a future release. This plugin is designed for TripleO + deployment but no longer used since Telemetry services were removed from + undercloud.