Merge "deprecate threshold rule alarms"
This commit is contained in:
commit
b154e48b22
@ -21,8 +21,10 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import itertools
|
import itertools
|
||||||
import json
|
import json
|
||||||
|
import warnings
|
||||||
|
|
||||||
import croniter
|
import croniter
|
||||||
|
import debtcollector
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_utils import netutils
|
from oslo_utils import netutils
|
||||||
@ -265,6 +267,12 @@ class Alarm(base.Base):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def validate(alarm):
|
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_rule(alarm)
|
||||||
Alarm.check_alarm_actions(alarm)
|
Alarm.check_alarm_actions(alarm)
|
||||||
|
@ -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``.
|
@ -34,3 +34,4 @@ WSME>=0.8
|
|||||||
cachetools>=1.1.6
|
cachetools>=1.1.6
|
||||||
cotyledon
|
cotyledon
|
||||||
keystoneauth1>=2.1
|
keystoneauth1>=2.1
|
||||||
|
debtcollector>=1.2.0 # Apache-2.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user