Clean deprecations from old "alarm" group
These options were inherited from ceilometer and for compatibility, they have been marked being deprecated in group "alarm". We are in Aodh 3.0 now, it is time to remove them. Change-Id: I41ef467750a403841ad96bfa7607ad63bd55702d
This commit is contained in:
parent
dd4c0f62bb
commit
c07b0ca9ef
@ -65,8 +65,7 @@ class AlarmGnocchiThresholdRule(base.AlarmRule):
|
|||||||
gnocchi_client = client.Client(
|
gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
interface=conf.service_credentials.interface,
|
||||||
region_name=conf.service_credentials.region_name,
|
region_name=conf.service_credentials.region_name)
|
||||||
endpoint_override=conf.gnocchi_url)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return gnocchi_client.capabilities.list().get(
|
return gnocchi_client.capabilities.list().get(
|
||||||
@ -105,8 +104,7 @@ class MetricOfResourceRule(AlarmGnocchiThresholdRule):
|
|||||||
gnocchi_client = client.Client(
|
gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
interface=conf.service_credentials.interface,
|
||||||
region_name=conf.service_credentials.region_name,
|
region_name=conf.service_credentials.region_name)
|
||||||
endpoint_override=conf.gnocchi_url)
|
|
||||||
|
|
||||||
rule = alarm.gnocchi_resources_threshold_rule
|
rule = alarm.gnocchi_resources_threshold_rule
|
||||||
try:
|
try:
|
||||||
@ -164,8 +162,7 @@ class AggregationMetricByResourcesLookupRule(AlarmGnocchiThresholdRule):
|
|||||||
gnocchi_client = client.Client(
|
gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
interface=conf.service_credentials.interface,
|
||||||
region_name=conf.service_credentials.region_name,
|
region_name=conf.service_credentials.region_name)
|
||||||
endpoint_override=conf.gnocchi_url)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
gnocchi_client.metric.aggregation(
|
gnocchi_client.metric.aggregation(
|
||||||
|
@ -54,16 +54,13 @@ LOG = log.getLogger(__name__)
|
|||||||
|
|
||||||
ALARM_API_OPTS = [
|
ALARM_API_OPTS = [
|
||||||
cfg.IntOpt('user_alarm_quota',
|
cfg.IntOpt('user_alarm_quota',
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Maximum number of alarms defined for a user.'
|
help='Maximum number of alarms defined for a user.'
|
||||||
),
|
),
|
||||||
cfg.IntOpt('project_alarm_quota',
|
cfg.IntOpt('project_alarm_quota',
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Maximum number of alarms defined for a project.'
|
help='Maximum number of alarms defined for a project.'
|
||||||
),
|
),
|
||||||
cfg.IntOpt('alarm_max_actions',
|
cfg.IntOpt('alarm_max_actions',
|
||||||
default=-1,
|
default=-1,
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Maximum count of actions for each state of an alarm, '
|
help='Maximum count of actions for each state of an alarm, '
|
||||||
'non-positive number means no limit.'),
|
'non-positive number means no limit.'),
|
||||||
]
|
]
|
||||||
|
@ -47,7 +47,6 @@ ALARM = 'alarm'
|
|||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.BoolOpt('record_history',
|
cfg.BoolOpt('record_history',
|
||||||
default=True,
|
default=True,
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Record alarm change events.'
|
help='Record alarm change events.'
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from gnocchiclient import client
|
from gnocchiclient import client
|
||||||
from oslo_config import cfg
|
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
|
|
||||||
@ -24,13 +23,6 @@ from aodh import keystone_client
|
|||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
OPTS = [
|
|
||||||
cfg.StrOpt('gnocchi_url',
|
|
||||||
deprecated_group="alarm",
|
|
||||||
deprecated_for_removal=True,
|
|
||||||
help='URL to Gnocchi. default: autodetection'),
|
|
||||||
]
|
|
||||||
|
|
||||||
# The list of points that Gnocchi API returned is composed
|
# The list of points that Gnocchi API returned is composed
|
||||||
# of tuples with (timestamp, granularity, value)
|
# of tuples with (timestamp, granularity, value)
|
||||||
GRANULARITY = 1
|
GRANULARITY = 1
|
||||||
@ -43,8 +35,7 @@ class GnocchiBase(threshold.ThresholdEvaluator):
|
|||||||
self._gnocchi_client = client.Client(
|
self._gnocchi_client = client.Client(
|
||||||
'1', keystone_client.get_session(conf),
|
'1', keystone_client.get_session(conf),
|
||||||
interface=conf.service_credentials.interface,
|
interface=conf.service_credentials.interface,
|
||||||
region_name=conf.service_credentials.region_name,
|
region_name=conf.service_credentials.region_name)
|
||||||
endpoint_override=conf.gnocchi_url)
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _sanitize(rule, statistics):
|
def _sanitize(rule, statistics):
|
||||||
|
@ -29,23 +29,19 @@ LOG = log.getLogger(__name__)
|
|||||||
OPTS = [
|
OPTS = [
|
||||||
cfg.StrOpt('rest_notifier_certificate_file',
|
cfg.StrOpt('rest_notifier_certificate_file',
|
||||||
default='',
|
default='',
|
||||||
deprecated_group="alarm",
|
|
||||||
help='SSL Client certificate for REST notifier.'
|
help='SSL Client certificate for REST notifier.'
|
||||||
),
|
),
|
||||||
cfg.StrOpt('rest_notifier_certificate_key',
|
cfg.StrOpt('rest_notifier_certificate_key',
|
||||||
default='',
|
default='',
|
||||||
deprecated_group="alarm",
|
|
||||||
help='SSL Client private key for REST notifier.'
|
help='SSL Client private key for REST notifier.'
|
||||||
),
|
),
|
||||||
cfg.BoolOpt('rest_notifier_ssl_verify',
|
cfg.BoolOpt('rest_notifier_ssl_verify',
|
||||||
default=True,
|
default=True,
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Whether to verify the SSL Server certificate when '
|
help='Whether to verify the SSL Server certificate when '
|
||||||
'calling alarm action.'
|
'calling alarm action.'
|
||||||
),
|
),
|
||||||
cfg.IntOpt('rest_notifier_max_retries',
|
cfg.IntOpt('rest_notifier_max_retries',
|
||||||
default=0,
|
default=0,
|
||||||
deprecated_group="alarm",
|
|
||||||
help='Number of retries for REST notifier',
|
help='Number of retries for REST notifier',
|
||||||
),
|
),
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ def list_opts():
|
|||||||
itertools.chain(
|
itertools.chain(
|
||||||
aodh.evaluator.OPTS,
|
aodh.evaluator.OPTS,
|
||||||
aodh.evaluator.event.OPTS,
|
aodh.evaluator.event.OPTS,
|
||||||
aodh.evaluator.gnocchi.OPTS,
|
|
||||||
aodh.event.OPTS,
|
aodh.event.OPTS,
|
||||||
aodh.notifier.rest.OPTS,
|
aodh.notifier.rest.OPTS,
|
||||||
aodh.queue.OPTS,
|
aodh.queue.OPTS,
|
||||||
|
@ -41,10 +41,7 @@ OPTS = [
|
|||||||
default=60,
|
default=60,
|
||||||
help='Period of evaluation cycle, should'
|
help='Period of evaluation cycle, should'
|
||||||
' be >= than configured pipeline interval for'
|
' be >= than configured pipeline interval for'
|
||||||
' collection of underlying meters.',
|
' collection of underlying meters.'),
|
||||||
deprecated_group='alarm',
|
|
||||||
deprecated_opts=[cfg.DeprecatedOpt(
|
|
||||||
'threshold_evaluation_interval', group='alarm')]),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -268,9 +268,6 @@ function configure_aodh {
|
|||||||
iniset "$AODH_UWSGI_FILE" uwsgi add-header "Connection: close"
|
iniset "$AODH_UWSGI_FILE" uwsgi add-header "Connection: close"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_service_enabled gnocchi-api; then
|
|
||||||
iniset $AODH_CONF DEFAULT gnocchi_url $(gnocchi_service_url)
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# init_aodh() - Initialize etc.
|
# init_aodh() - Initialize etc.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user