Merge "deprecate threshold rule alarms"

This commit is contained in:
Jenkins 2017-03-10 00:15:19 +00:00 committed by Gerrit Code Review
commit b154e48b22
3 changed files with 18 additions and 0 deletions

View File

@ -21,8 +21,10 @@
import datetime
import itertools
import json
import warnings
import croniter
import debtcollector
from oslo_config import cfg
from oslo_log import log
from oslo_utils import netutils
@ -265,6 +267,12 @@ class Alarm(base.Base):
@staticmethod
def validate(alarm):
if alarm.type == 'threshold':
warnings.simplefilter("always")
debtcollector.deprecate(
"Ceilometer's API is deprecated as of Ocata. Therefore, "
" threshold rule alarms are no longer supported.",
version="5.0.0")
Alarm.check_rule(alarm)
Alarm.check_alarm_actions(alarm)

View File

@ -0,0 +1,9 @@
---
deprecations:
- |
Ceilometer's API is deprecated in Ocata. Therefore, threshold alarms are
now deprecated as well. Threshold rules will be removed when Ceilometer's
API is also removed. Similar functionality is provided through Gnocchi
alarm rules: ``gnocchi_resources_threshold``,
``gnocchi_aggregation_by_metrics_threshold``, or
``gnocchi_aggregation_by_resources_threshold``.

View File

@ -34,3 +34,4 @@ WSME>=0.8
cachetools>=1.1.6
cotyledon
keystoneauth1>=2.1
debtcollector>=1.2.0 # Apache-2.0