deprecate threshold rule alarms

ceilometer's api is deprecated, so threshold rule alarms cannot exist
either.

Change-Id: I69a5778edb62843acc36b5366947071745fb43b4
This commit is contained in:
gord chung 2017-02-28 10:17:22 -05:00
parent ec2bebedca
commit 69cfeca362
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