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:
liusheng 2016-03-24 11:30:11 +08:00
parent dd4c0f62bb
commit c07b0ca9ef
8 changed files with 5 additions and 32 deletions

View File

@ -65,8 +65,7 @@ class AlarmGnocchiThresholdRule(base.AlarmRule):
gnocchi_client = client.Client(
'1', keystone_client.get_session(conf),
interface=conf.service_credentials.interface,
region_name=conf.service_credentials.region_name,
endpoint_override=conf.gnocchi_url)
region_name=conf.service_credentials.region_name)
try:
return gnocchi_client.capabilities.list().get(
@ -105,8 +104,7 @@ class MetricOfResourceRule(AlarmGnocchiThresholdRule):
gnocchi_client = client.Client(
'1', keystone_client.get_session(conf),
interface=conf.service_credentials.interface,
region_name=conf.service_credentials.region_name,
endpoint_override=conf.gnocchi_url)
region_name=conf.service_credentials.region_name)
rule = alarm.gnocchi_resources_threshold_rule
try:
@ -164,8 +162,7 @@ class AggregationMetricByResourcesLookupRule(AlarmGnocchiThresholdRule):
gnocchi_client = client.Client(
'1', keystone_client.get_session(conf),
interface=conf.service_credentials.interface,
region_name=conf.service_credentials.region_name,
endpoint_override=conf.gnocchi_url)
region_name=conf.service_credentials.region_name)
try:
gnocchi_client.metric.aggregation(

View File

@ -54,16 +54,13 @@ LOG = log.getLogger(__name__)
ALARM_API_OPTS = [
cfg.IntOpt('user_alarm_quota',
deprecated_group="alarm",
help='Maximum number of alarms defined for a user.'
),
cfg.IntOpt('project_alarm_quota',
deprecated_group="alarm",
help='Maximum number of alarms defined for a project.'
),
cfg.IntOpt('alarm_max_actions',
default=-1,
deprecated_group="alarm",
help='Maximum count of actions for each state of an alarm, '
'non-positive number means no limit.'),
]

View File

@ -47,7 +47,6 @@ ALARM = 'alarm'
OPTS = [
cfg.BoolOpt('record_history',
default=True,
deprecated_group="alarm",
help='Record alarm change events.'
),
]

View File

@ -14,7 +14,6 @@
# under the License.
from gnocchiclient import client
from oslo_config import cfg
from oslo_log import log
from oslo_serialization import jsonutils
@ -24,13 +23,6 @@ from aodh import keystone_client
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
# of tuples with (timestamp, granularity, value)
GRANULARITY = 1
@ -43,8 +35,7 @@ class GnocchiBase(threshold.ThresholdEvaluator):
self._gnocchi_client = client.Client(
'1', keystone_client.get_session(conf),
interface=conf.service_credentials.interface,
region_name=conf.service_credentials.region_name,
endpoint_override=conf.gnocchi_url)
region_name=conf.service_credentials.region_name)
@staticmethod
def _sanitize(rule, statistics):

View File

@ -29,23 +29,19 @@ LOG = log.getLogger(__name__)
OPTS = [
cfg.StrOpt('rest_notifier_certificate_file',
default='',
deprecated_group="alarm",
help='SSL Client certificate for REST notifier.'
),
cfg.StrOpt('rest_notifier_certificate_key',
default='',
deprecated_group="alarm",
help='SSL Client private key for REST notifier.'
),
cfg.BoolOpt('rest_notifier_ssl_verify',
default=True,
deprecated_group="alarm",
help='Whether to verify the SSL Server certificate when '
'calling alarm action.'
),
cfg.IntOpt('rest_notifier_max_retries',
default=0,
deprecated_group="alarm",
help='Number of retries for REST notifier',
),

View File

@ -35,7 +35,6 @@ def list_opts():
itertools.chain(
aodh.evaluator.OPTS,
aodh.evaluator.event.OPTS,
aodh.evaluator.gnocchi.OPTS,
aodh.event.OPTS,
aodh.notifier.rest.OPTS,
aodh.queue.OPTS,

View File

@ -41,10 +41,7 @@ OPTS = [
default=60,
help='Period of evaluation cycle, should'
' be >= than configured pipeline interval for'
' collection of underlying meters.',
deprecated_group='alarm',
deprecated_opts=[cfg.DeprecatedOpt(
'threshold_evaluation_interval', group='alarm')]),
' collection of underlying meters.'),
]

View File

@ -268,9 +268,6 @@ function configure_aodh {
iniset "$AODH_UWSGI_FILE" uwsgi add-header "Connection: close"
fi
if is_service_enabled gnocchi-api; then
iniset $AODH_CONF DEFAULT gnocchi_url $(gnocchi_service_url)
fi
}
# init_aodh() - Initialize etc.