Rename to aodh

Change-Id: Ibd4c9811daa6e9e692457ce480a58c964fef7cb9
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2015-06-08 08:40:09 +02:00
parent 038ea63f40
commit 8372f48b7a
165 changed files with 597 additions and 636 deletions

View File

@ -1,7 +1,7 @@
[run]
branch = True
source = ceilometer
omit = ceilometer/tests/*, ceilometer/openstack/common/*
source = aodh
omit = aodh/tests/*, aodh/openstack/common/*
[report]
ignore-errors = True

2
.gitignore vendored
View File

@ -11,7 +11,7 @@ cover/*
dist/*
doc/build/*
doc/source/sourcecode
etc/ceilometer/ceilometer.conf
etc/aodh/aodh.conf
subunit.log
tools/lintstack.head.py
tools/pylint_exceptions

View File

@ -1,4 +1,4 @@
[gerrit]
host=review.openstack.org
port=29418
project=openstack/ceilometer.git
project=openstack/aodh.git

View File

@ -2,7 +2,7 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-600} \
${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-./ceilometer/tests} -t . $LISTOPT $IDOPTION
${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-./aodh/tests} -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
# NOTE(chdent): Only used/matches on gabbi-related tests.

View File

@ -13,4 +13,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/ceilometer
https://bugs.launchpad.net/aodh

View File

@ -1,11 +1,11 @@
Ceilometer Style Commandments
=============================
Aodh Style Commandments
=======================
- Step 1: Read the OpenStack Style Commandments
http://docs.openstack.org/developer/hacking/
- Step 2: Read on
Ceilometer Specific Commandments
--------------------------------
Aodh Specific Commandments
--------------------------
- [C300] Check for oslo library imports use the non-namespaced packages

View File

@ -1,10 +1,10 @@
= Generalist Code Reviewers =
The current members of ceilometer-core are listed here:
The current members of aodh-core are listed here:
https://launchpad.net/~ceilometer-drivers/+members#active
https://launchpad.net/~aodh-drivers/+members#active
This group can +2 and approve patches in Ceilometer. However, they may
This group can +2 and approve patches in aodh. However, they may
choose to seek feedback from the appropriate specialist maintainer before
approving a patch if it is in any way controversial or risky.
@ -31,7 +31,7 @@ Each has an entry with the following keys:
Maintained: Has an active maintainer
Orphan: No current maintainer, feel free to step up!
Obsolete: Replaced by newer code, or a dead end, or out-dated
F: Wildcard patterns, relative to ceilometer/
F: Wildcard patterns, relative to aodh/
== alarms ==

View File

@ -1,6 +1,6 @@
ceilometer
==========
aodh
====
See the ReleaseNotes document and the project home for more info.
http://launchpad.net/ceilometer
http://launchpad.net/aodh

View File

@ -1,11 +1,11 @@
Release notes are maintained in rst format in
doc/source/releasenotes/
they can be read online at
http://docs.openstack.org/developer/ceilometer/releasenotes/index.html
http://docs.openstack.org/developer/aodh/releasenotes/index.html
Documentation for the project can be found at:
http://docs.openstack.org/developer/ceilometer/
http://docs.openstack.org/developer/aodh/
The project home is at:
http://launchpad.net/ceilometer
http://launchpad.net/aodh

View File

@ -18,8 +18,8 @@
from stevedore import extension
EVALUATOR_EXTENSIONS_NAMESPACE = "ceilometer.alarm.evaluator"
NOTIFIER_EXTENSIONS_NAMESPACE = "ceilometer.alarm.notifier"
EVALUATOR_EXTENSIONS_NAMESPACE = "aodh.alarm.evaluator"
NOTIFIER_EXTENSIONS_NAMESPACE = "aodh.alarm.notifier"
NOTIFIERS = extension.ExtensionManager(NOTIFIER_EXTENSIONS_NAMESPACE,
invoke_on_load=True)

View File

@ -27,7 +27,7 @@ from oslo_utils import timeutils
import pytz
import six
from ceilometer.i18n import _
from aodh.i18n import _
LOG = log.getLogger(__name__)
@ -36,8 +36,8 @@ UNKNOWN = 'insufficient data'
OK = 'ok'
ALARM = 'alarm'
cfg.CONF.import_opt('http_timeout', 'ceilometer.service')
cfg.CONF.import_group('service_credentials', 'ceilometer.service')
cfg.CONF.import_opt('http_timeout', 'aodh.service')
cfg.CONF.import_group('service_credentials', 'aodh.service')
@six.add_metaclass(abc.ABCMeta)

View File

@ -19,8 +19,8 @@
from oslo_log import log
from six import moves
from ceilometer.alarm import evaluator
from ceilometer.i18n import _
from aodh.alarm import evaluator
from aodh.i18n import _
LOG = log.getLogger(__name__)

View File

@ -23,9 +23,9 @@ from oslo_utils import timeutils
import requests
import six.moves
from ceilometer.alarm import evaluator
from ceilometer.i18n import _
from ceilometer import keystone_client
from aodh.alarm import evaluator
from aodh.i18n import _
from aodh import keystone_client
LOG = log.getLogger(__name__)
@ -45,7 +45,7 @@ OPTS = [
]
cfg.CONF.register_opts(OPTS, group="alarms")
cfg.CONF.import_opt('http_timeout', 'ceilometer.service')
cfg.CONF.import_opt('http_timeout', 'aodh.service')
class GnocchiThresholdEvaluator(evaluator.Evaluator):

View File

@ -19,9 +19,9 @@ import operator
from oslo_log import log
from oslo_utils import timeutils
from ceilometer.alarm import evaluator
from ceilometer.alarm.evaluator import utils
from ceilometer.i18n import _, _LW
from aodh.alarm import evaluator
from aodh.alarm.evaluator import utils
from aodh.i18n import _, _LW
LOG = log.getLogger(__name__)

View File

@ -16,8 +16,8 @@
from oslo_log import log
from ceilometer.alarm import notifier
from ceilometer.i18n import _
from aodh.alarm import notifier
from aodh.i18n import _
LOG = log.getLogger(__name__)

View File

@ -22,8 +22,8 @@ from oslo_serialization import jsonutils
import requests
import six.moves.urllib.parse as urlparse
from ceilometer.alarm import notifier
from ceilometer.i18n import _
from aodh.alarm import notifier
from aodh.i18n import _
LOG = log.getLogger(__name__)
@ -80,7 +80,7 @@ class RestAlarmNotifier(notifier.AlarmNotifier):
if action.scheme == 'https':
default_verify = int(cfg.CONF.alarm.rest_notifier_ssl_verify)
options = urlparse.parse_qs(action.query)
verify = bool(int(options.get('ceilometer-alarm-ssl-verify',
verify = bool(int(options.get('aodh-alarm-ssl-verify',
[default_verify])[-1]))
kwargs['verify'] = verify

View File

@ -14,7 +14,7 @@
# under the License.
"""Test alarm notifier."""
from ceilometer.alarm import notifier
from aodh.alarm import notifier
class TestAlarmNotifier(notifier.AlarmNotifier):

View File

@ -18,18 +18,18 @@ from keystoneclient.v3 import client as keystone_client
from oslo_config import cfg
from six.moves.urllib import parse
from ceilometer.alarm.notifier import rest
from aodh.alarm.notifier import rest
cfg.CONF.import_opt('http_timeout', 'ceilometer.service')
cfg.CONF.import_group('service_credentials', 'ceilometer.service')
cfg.CONF.import_opt('http_timeout', 'aodh.service')
cfg.CONF.import_group('service_credentials', 'aodh.service')
class TrustRestAlarmNotifier(rest.RestAlarmNotifier):
"""Notifier supporting keystone trust authentication.
This alarm notifier is intended to be used to call an endpoint using
keystone authentication. It uses the ceilometer service user to
keystone authentication. It uses the aodh service user to
authenticate using the trust ID provided.
The URL must be in the form trust+http://trust-id@host/action.

View File

@ -20,14 +20,14 @@ from oslo_context import context
from oslo_log import log
import six
from ceilometer.alarm.storage import models
from ceilometer.i18n import _
from ceilometer import messaging
from aodh.alarm.storage import models
from aodh.i18n import _
from aodh import messaging
OPTS = [
cfg.StrOpt('notifier_rpc_topic',
default='alarm_notifier',
help='The topic that ceilometer uses for alarm notifier '
help='The topic that aodh uses for alarm notifier '
'messages.'),
]

View File

@ -27,11 +27,11 @@ from oslo_utils import netutils
import six
from stevedore import extension
from ceilometer import alarm as ceilometer_alarm
from ceilometer.alarm import rpc as rpc_alarm
from ceilometer import coordination as coordination
from ceilometer.i18n import _
from ceilometer import messaging
from aodh import alarm as aodh_alarm
from aodh.alarm import rpc as rpc_alarm
from aodh import coordination as coordination
from aodh.i18n import _
from aodh import messaging
OPTS = [
@ -45,8 +45,8 @@ OPTS = [
]
cfg.CONF.register_opts(OPTS, group='alarm')
cfg.CONF.import_opt('http_timeout', 'ceilometer.service')
cfg.CONF.import_group('service_credentials', 'ceilometer.service')
cfg.CONF.import_opt('http_timeout', 'aodh.service')
cfg.CONF.import_group('service_credentials', 'aodh.service')
LOG = log.getLogger(__name__)
@ -61,7 +61,7 @@ class AlarmService(object):
def _load_evaluators(self):
self.evaluators = extension.ExtensionManager(
namespace=ceilometer_alarm.EVALUATOR_EXTENSIONS_NAMESPACE,
namespace=aodh_alarm.EVALUATOR_EXTENSIONS_NAMESPACE,
invoke_on_load=True,
invoke_args=(rpc_alarm.RPCAlarmNotifier(),)
)
@ -181,7 +181,7 @@ class AlarmNotifierService(os_service.Service):
return
try:
notifier = ceilometer_alarm.NOTIFIERS[action.scheme].obj
notifier = aodh_alarm.NOTIFIERS[action.scheme].obj
except KeyError:
scheme = action.scheme
LOG.error(

View File

@ -14,7 +14,7 @@
# under the License.
"""Base classes for storage engines
"""
import ceilometer
import aodh
class Connection(object):
@ -55,7 +55,7 @@ class Connection(object):
:param alarm_type: Optional alarm type.
:parmr severity: Optional alarm severity
"""
raise ceilometer.NotImplementedError('Alarms not implemented')
raise aodh.NotImplementedError('Alarms not implemented')
@staticmethod
def create_alarm(alarm):
@ -63,17 +63,17 @@ class Connection(object):
:param alarm: The alarm to create.
"""
raise ceilometer.NotImplementedError('Alarms not implemented')
raise aodh.NotImplementedError('Alarms not implemented')
@staticmethod
def update_alarm(alarm):
"""Update alarm."""
raise ceilometer.NotImplementedError('Alarms not implemented')
raise aodh.NotImplementedError('Alarms not implemented')
@staticmethod
def delete_alarm(alarm_id):
"""Delete an alarm."""
raise ceilometer.NotImplementedError('Alarms not implemented')
raise aodh.NotImplementedError('Alarms not implemented')
@staticmethod
def get_alarm_changes(alarm_id, on_behalf_of,
@ -105,12 +105,12 @@ class Connection(object):
:param end_timestamp: Optional modified timestamp end range
:param end_timestamp_op: Optional timestamp end range operation
"""
raise ceilometer.NotImplementedError('Alarm history not implemented')
raise aodh.NotImplementedError('Alarm history not implemented')
@staticmethod
def record_alarm_change(alarm_change):
"""Record alarm change event."""
raise ceilometer.NotImplementedError('Alarm history not implemented')
raise aodh.NotImplementedError('Alarm history not implemented')
@staticmethod
def clear():
@ -125,8 +125,8 @@ class Connection(object):
:param limit: Maximum number of results to return.
"""
raise ceilometer.NotImplementedError('Complex query for alarms '
'is not implemented.')
raise aodh.NotImplementedError('Complex query for alarms '
'is not implemented.')
@staticmethod
def query_alarm_history(filter_expr=None, orderby=None, limit=None):
@ -137,8 +137,8 @@ class Connection(object):
:param limit: Maximum number of results to return.
"""
raise ceilometer.NotImplementedError('Complex query for alarms '
'history is not implemented.')
raise aodh.NotImplementedError('Complex query for alarms '
'history is not implemented.')
@classmethod
def get_capabilities(cls):
@ -162,5 +162,5 @@ class Connection(object):
:param alarm_history_ttl: Number of seconds to keep alarm history
records for.
"""
raise ceilometer.NotImplementedError('Clearing alarm history '
'not implemented')
raise aodh.NotImplementedError('Clearing alarm history '
'not implemented')

View File

@ -21,15 +21,15 @@ from __future__ import division
from oslo_log import log
import pymongo
from ceilometer.alarm.storage import pymongo_base
from ceilometer import storage
from ceilometer.storage.mongo import utils as pymongo_utils
from aodh.alarm.storage import pymongo_base
from aodh import storage
from aodh.storage.mongo import utils as pymongo_utils
LOG = log.getLogger(__name__)
class Connection(pymongo_base.Connection):
"""The db2 alarm storage for Ceilometer."""
"""The db2 alarm storage for aodh."""
CONNECTION_POOL = pymongo_utils.ConnectionPool()

View File

@ -16,14 +16,14 @@ import operator
from oslo_log import log
import ceilometer
from ceilometer.alarm.storage import base
from ceilometer.alarm.storage import models
from ceilometer.i18n import _
from ceilometer.storage.hbase import base as hbase_base
from ceilometer.storage.hbase import migration as hbase_migration
from ceilometer.storage.hbase import utils as hbase_utils
from ceilometer import utils
import aodh
from aodh.alarm.storage import base
from aodh.alarm.storage import models
from aodh.i18n import _
from aodh.storage.hbase import base as hbase_base
from aodh.storage.hbase import migration as hbase_migration
from aodh.storage.hbase import utils as hbase_utils
from aodh import utils
LOG = log.getLogger(__name__)
@ -124,7 +124,7 @@ class Connection(hbase_base.Connection, base.Connection):
alarm_type=None, severity=None):
if meter:
raise ceilometer.NotImplementedError(
raise aodh.NotImplementedError(
'Filter by meter not implemented')
q = hbase_utils.make_query(alarm_id=alarm_id, name=name,

View File

@ -17,8 +17,8 @@
from oslo_log import log
from ceilometer.alarm.storage import base
from ceilometer.i18n import _LI
from aodh.alarm.storage import base
from aodh.i18n import _LI
LOG = log.getLogger(__name__)

View File

@ -24,11 +24,11 @@ from oslo_config import cfg
from oslo_log import log
import pymongo
from ceilometer.alarm.storage import pymongo_base
from ceilometer import storage
from ceilometer.storage.mongo import utils as pymongo_utils
from aodh.alarm.storage import pymongo_base
from aodh import storage
from aodh.storage.mongo import utils as pymongo_utils
cfg.CONF.import_opt('alarm_history_time_to_live', 'ceilometer.alarm.storage',
cfg.CONF.import_opt('alarm_history_time_to_live', 'aodh.alarm.storage',
group="database")
LOG = log.getLogger(__name__)

View File

@ -21,12 +21,12 @@ from oslo_log import log
from oslo_utils import timeutils
from sqlalchemy import desc
from ceilometer.alarm.storage import base
from ceilometer.alarm.storage import models as alarm_api_models
from ceilometer.i18n import _LI
from ceilometer.storage.sqlalchemy import models
from ceilometer.storage.sqlalchemy import utils as sql_utils
from ceilometer import utils
from aodh.alarm.storage import base
from aodh.alarm.storage import models as alarm_api_models
from aodh.i18n import _LI
from aodh.storage.sqlalchemy import models
from aodh.storage.sqlalchemy import utils as sql_utils
from aodh import utils
LOG = log.getLogger(__name__)

View File

@ -17,8 +17,8 @@
import datetime
from ceilometer.i18n import _
from ceilometer.storage import base
from aodh.i18n import _
from aodh.storage import base
class Alarm(base.Model):

View File

@ -21,10 +21,10 @@
from oslo_log import log
import pymongo
from ceilometer.alarm.storage import base
from ceilometer.alarm.storage import models
from ceilometer.storage.mongo import utils as pymongo_utils
from ceilometer import utils
from aodh.alarm.storage import base
from aodh.alarm.storage import models
from aodh.storage.mongo import utils as pymongo_utils
from aodh import utils
LOG = log.getLogger(__name__)

View File

@ -21,16 +21,16 @@ OPTS = [
default=8777,
deprecated_name='metering_api_port',
deprecated_group='DEFAULT',
help='The port for the ceilometer API server.',
help='The port for the aodh API server.',
),
cfg.StrOpt('host',
default='0.0.0.0',
help='The listen IP for the ceilometer API server.',
help='The listen IP for the aodh API server.',
),
]
CONF = cfg.CONF
opt_group = cfg.OptGroup(name='api',
title='Options for the ceilometer-api service')
title='Options for the aodh-api service')
CONF.register_group(opt_group)
CONF.register_opts(OPTS, opt_group)

View File

@ -22,13 +22,13 @@ from paste import deploy
import pecan
from werkzeug import serving
from ceilometer.api import config as api_config
from ceilometer.api import hooks
from ceilometer.api import middleware
from ceilometer.i18n import _
from ceilometer.i18n import _LW
from ceilometer import service
from ceilometer import storage
from aodh.api import config as api_config
from aodh.api import hooks
from aodh.api import middleware
from aodh.i18n import _
from aodh.i18n import _LW
from aodh import service
from aodh import storage
LOG = log.getLogger(__name__)
@ -41,7 +41,7 @@ OPTS = [
help="Configuration file for WSGI definition of API."
),
cfg.IntOpt('api_workers', default=1,
help='Number of workers for Ceilometer API server.'),
help='Number of workers for aodh API server.'),
]
API_OPTS = [

View File

@ -17,8 +17,8 @@
See http://pecan.readthedocs.org/en/latest/deployment.html for details.
"""
from ceilometer import service
from ceilometer.api import app
from aodh import service
from aodh.api import app
# Initialize the oslo configuration library and logging
service.prepare_service([])

View File

@ -18,8 +18,8 @@ server = {
# Pecan Application Configurations
app = {
'root': 'ceilometer.api.controllers.root.RootController',
'modules': ['ceilometer.api'],
'root': 'aodh.api.controllers.root.RootController',
'modules': ['aodh.api'],
}
# Custom Configurations must be in Python dictionary format::

View File

@ -15,7 +15,7 @@
import pecan
from ceilometer.api.controllers.v2 import root as v2
from aodh.api.controllers.v2 import root as v2
MEDIA_TYPE_JSON = 'application/vnd.openstack.telemetry-%s+json'
MEDIA_TYPE_XML = 'application/vnd.openstack.telemetry-%s+xml'

View File

@ -15,9 +15,9 @@ import pecan
import wsme
from wsme import types as wtypes
from ceilometer.api.controllers.v2 import base
from ceilometer.api.controllers.v2 import utils as v2_utils
from ceilometer.i18n import _
from aodh.api.controllers.v2 import base
from aodh.api.controllers.v2 import utils as v2_utils
from aodh.i18n import _
class AlarmCombinationRule(base.AlarmRule):

View File

@ -19,12 +19,12 @@ import requests
import wsme
from wsme import types as wtypes
from ceilometer.api.controllers.v2 import base
from ceilometer.api.controllers.v2 import utils as v2_utils
from ceilometer import keystone_client
from aodh.api.controllers.v2 import base
from aodh.api.controllers.v2 import utils as v2_utils
from aodh import keystone_client
cfg.CONF.import_opt('gnocchi_url', 'ceilometer.alarm.evaluator.gnocchi',
cfg.CONF.import_opt('gnocchi_url', 'aodh.alarm.evaluator.gnocchi',
group="alarms")

View File

@ -14,10 +14,10 @@
import wsme
from wsme import types as wtypes
from ceilometer.api.controllers.v2 import base
from ceilometer.api.controllers.v2 import utils as v2_utils
from ceilometer.i18n import _
from ceilometer import storage
from aodh.api.controllers.v2 import base
from aodh.api.controllers.v2 import utils as v2_utils
from aodh.i18n import _
from aodh import storage
class AlarmThresholdRule(base.AlarmRule):

View File

@ -37,16 +37,16 @@ import wsme
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
import ceilometer
from ceilometer import alarm as ceilometer_alarm
from ceilometer.alarm.storage import models as alarm_models
from ceilometer.api.controllers.v2.alarm_rules import combination
from ceilometer.api.controllers.v2 import base
from ceilometer.api.controllers.v2 import utils as v2_utils
from ceilometer.api import rbac
from ceilometer.i18n import _
from ceilometer import messaging
from ceilometer import utils
import aodh
from aodh import alarm as aodh_alarm
from aodh.alarm.storage import models as alarm_models
from aodh.api.controllers.v2.alarm_rules import combination
from aodh.api.controllers.v2 import base
from aodh.api.controllers.v2 import utils as v2_utils
from aodh.api import rbac
from aodh.i18n import _
from aodh import messaging
from aodh import utils
LOG = log.getLogger(__name__)
@ -180,7 +180,7 @@ class AlarmTimeConstraint(base.Base):
timezone='Europe/Ljubljana')
ALARMS_RULES = extension.ExtensionManager("ceilometer.alarm.rule")
ALARMS_RULES = extension.ExtensionManager("aodh.alarm.rule")
LOG.debug("alarm rules plugin loaded: %s" % ",".join(ALARMS_RULES.names()))
@ -309,7 +309,7 @@ class Alarm(base.Base):
@staticmethod
def check_alarm_actions(alarm):
actions_schema = ceilometer_alarm.NOTIFIER_SCHEMAS
actions_schema = aodh_alarm.NOTIFIER_SCHEMAS
max_actions = cfg.CONF.alarm.alarm_max_actions
for state in state_kind:
actions_name = state.replace(" ", "_") + '_actions'
@ -429,7 +429,7 @@ def _send_notification(event, payload):
notification = event.replace(" ", "_")
notification = "alarm.%s" % notification
transport = messaging.get_transport()
notifier = messaging.get_notifier(transport, publisher_id="ceilometer.api")
notifier = messaging.get_notifier(transport, publisher_id="aodh.api")
# FIXME(sileht): perhaps we need to copy some infos from the
# pecan request headers like nova does
notifier.info(context.RequestContext(), notification, payload)
@ -476,7 +476,7 @@ class AlarmController(rest.RestController):
try:
self.conn.record_alarm_change(payload)
except ceilometer.NotImplementedError:
except aodh.NotImplementedError:
pass
# Revert to the pre-json'ed details ...
@ -645,7 +645,7 @@ class AlarmsController(rest.RestController):
try:
conn.record_alarm_change(payload)
except ceilometer.NotImplementedError:
except aodh.NotImplementedError:
pass
# Revert to the pre-json'ed details ...

View File

@ -30,7 +30,7 @@ import six
import wsme
from wsme import types as wtypes
from ceilometer.i18n import _
from aodh.i18n import _
operation_kind = ('lt', 'le', 'eq', 'ne', 'ge', 'gt')

View File

@ -23,8 +23,8 @@ from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from ceilometer.api.controllers.v2 import base
from ceilometer import utils
from aodh.api.controllers.v2 import base
from aodh import utils
def _flatten_capabilities(capabilities):

View File

@ -28,12 +28,12 @@ from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from ceilometer.alarm.storage import models as alarm_models
from ceilometer.api.controllers.v2 import alarms
from ceilometer.api.controllers.v2 import base
from ceilometer.api import rbac
from ceilometer.i18n import _
from ceilometer import utils
from aodh.alarm.storage import models as alarm_models
from aodh.api.controllers.v2 import alarms
from aodh.api.controllers.v2 import base
from aodh.api import rbac
from aodh.i18n import _
from aodh import utils
LOG = log.getLogger(__name__)

View File

@ -18,9 +18,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from ceilometer.api.controllers.v2 import alarms
from ceilometer.api.controllers.v2 import capabilities
from ceilometer.api.controllers.v2 import query
from aodh.api.controllers.v2 import alarms
from aodh.api.controllers.v2 import capabilities
from aodh.api.controllers.v2 import query
class V2Controller(object):

View File

@ -26,8 +26,8 @@ from oslo_utils import timeutils
import pecan
import wsme
from ceilometer.api.controllers.v2 import base
from ceilometer.api import rbac
from aodh.api.controllers.v2 import base
from aodh.api import rbac
def get_auth_project(on_behalf_of=None):

View File

@ -26,9 +26,9 @@ from oslo_log import log
import six
import webob
from ceilometer.api import hooks
from ceilometer import i18n
from ceilometer.i18n import _
from aodh.api import hooks
from aodh import i18n
from aodh.i18n import _
LOG = log.getLogger(__name__)

View File

@ -14,8 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from ceilometer.api import app
from ceilometer import service
from aodh.api import app
from aodh import service
def main():

View File

@ -17,8 +17,8 @@
from oslo_config import cfg
from oslo_service import service as os_service
from ceilometer.alarm import service as alarm_service
from ceilometer import service
from aodh.alarm import service as alarm_service
from aodh import service
CONF = cfg.CONF

View File

@ -18,9 +18,9 @@ import logging
from oslo_config import cfg
from ceilometer.i18n import _LI
from ceilometer import service
from ceilometer import storage
from aodh.i18n import _LI
from aodh import service
from aodh import storage
LOG = logging.getLogger(__name__)

View File

@ -19,8 +19,8 @@ from oslo_config import cfg
from oslo_log import log
import tooz.coordination
from ceilometer.i18n import _LE, _LI
from ceilometer import utils
from aodh.i18n import _LE, _LI
from aodh import utils
LOG = log.getLogger(__name__)

View File

@ -15,14 +15,14 @@
"""
Guidelines for writing new hacking checks
- Use only for Ceilometer specific tests. OpenStack general tests
- Use only for aodh specific tests. OpenStack general tests
should be submitted to the common 'hacking' module.
- Pick numbers in the range C3xx. Find the current test with
the highest allocated number and then pick the next value.
- Keep the test method code in the source file ordered based
on the C3xx value.
- List the new rule in the top level HACKING.rst file
- Add test cases for each new rule to ceilometer/tests/test_hacking.py
- Add test cases for each new rule to aodh/tests/test_hacking.py
"""
@ -37,7 +37,7 @@ oslo_namespace_imports = re.compile(
def check_oslo_namespace_imports(logical_line, physical_line, filename):
# ignore openstack.common since they are not maintained by us
if 'ceilometer/openstack/common/' in filename:
if 'aodh/openstack/common/' in filename:
return
if re.match(oslo_namespace_imports, logical_line):

View File

@ -20,7 +20,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
import oslo_i18n
DOMAIN = 'ceilometer'
DOMAIN = 'aodh'
_translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)

View File

@ -17,8 +17,8 @@
from keystoneclient.v2_0 import client as ksclient
from oslo_config import cfg
cfg.CONF.import_group('service_credentials', 'ceilometer.service')
cfg.CONF.import_opt('http_timeout', 'ceilometer.service')
cfg.CONF.import_group('service_credentials', 'aodh.service')
cfg.CONF.import_opt('http_timeout', 'aodh.service')
def get_client():

View File

@ -52,7 +52,7 @@ class JsonPayloadSerializer(oslo_messaging.NoOpSerializer):
def setup():
oslo_messaging.set_transport_defaults('ceilometer')
oslo_messaging.set_transport_defaults('aodh')
def get_transport(url=None, optional=False, cache=True):
@ -86,7 +86,7 @@ def cleanup():
def get_rpc_server(transport, topic, endpoint):
"""Return a configured oslo_messaging rpc server."""
cfg.CONF.import_opt('host', 'ceilometer.service')
cfg.CONF.import_opt('host', 'aodh.service')
target = oslo_messaging.Target(server=cfg.CONF.host, topic=topic)
serializer = RequestContextSerializer(JsonPayloadSerializer())
return oslo_messaging.get_rpc_server(transport, target,

View File

@ -24,7 +24,7 @@ try:
# repository. It is OK to have more than one translation function
# using the same domain, since there will still only be one message
# catalog.
_translators = oslo_i18n.TranslatorFactory(domain='ceilometer')
_translators = oslo_i18n.TranslatorFactory(domain='aodh')
# The primary translation function using the well-known name "_"
_ = _translators.primary

45
aodh/opts.py Normal file
View File

@ -0,0 +1,45 @@
# Copyright 2014 eNovance
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import itertools
import aodh.alarm.notifier.rest
import aodh.alarm.rpc
import aodh.alarm.service
import aodh.api
import aodh.api.app
import aodh.api.controllers.v2.alarms
import aodh.coordination
import aodh.service
import aodh.storage
def list_opts():
return [
('DEFAULT',
itertools.chain(aodh.api.app.OPTS,
aodh.service.OPTS,
aodh.storage.OLD_OPTS,)),
('alarm',
itertools.chain(aodh.alarm.notifier.rest.OPTS,
aodh.alarm.service.OPTS,
aodh.alarm.rpc.OPTS,
aodh.alarm.evaluator.gnocchi.OPTS,
aodh.api.controllers.v2.alarms.ALARM_API_OPTS)),
('api',
itertools.chain(aodh.api.OPTS,
aodh.api.app.API_OPTS,)),
('coordination', aodh.coordination.OPTS),
('database', aodh.storage.OPTS),
('service_credentials', aodh.service.CLI_OPTS),
]

View File

@ -22,9 +22,9 @@ from oslo_config import cfg
import oslo_i18n
from oslo_log import log
from ceilometer.i18n import _
from ceilometer import messaging
from ceilometer import utils
from aodh.i18n import _
from aodh import messaging
from aodh import utils
OPTS = [
@ -47,7 +47,7 @@ cfg.CONF.register_opts(OPTS)
CLI_OPTS = [
cfg.StrOpt('os-username',
deprecated_group="DEFAULT",
default=os.environ.get('OS_USERNAME', 'ceilometer'),
default=os.environ.get('OS_USERNAME', 'aodh'),
help='User name to use for OpenStack service access.'),
cfg.StrOpt('os-password',
deprecated_group="DEFAULT",
@ -111,6 +111,6 @@ def prepare_service(argv=None):
log.set_defaults(default_log_levels=log_levels)
if argv is None:
argv = sys.argv
cfg.CONF(argv[1:], project='ceilometer', validate_default_values=True)
log.setup(cfg.CONF, 'ceilometer')
cfg.CONF(argv[1:], project='aodh', validate_default_values=True)
log.setup(cfg.CONF, 'aodh')
messaging.setup()

View File

@ -22,7 +22,7 @@ import retrying
import six.moves.urllib.parse as urlparse
from stevedore import driver
from ceilometer import utils
from aodh import utils
LOG = log.getLogger(__name__)
@ -98,7 +98,7 @@ def get_connection_from_config(conf, purpose='alarm'):
if conf.database_connection:
conf.set_override('connection', conf.database_connection,
group='database')
namespace = 'ceilometer.%s.storage' % purpose
namespace = 'aodh.%s.storage' % purpose
url = (getattr(conf.database, '%s_connection' % purpose) or
conf.database.connection)
return get_connection(url, namespace)

View File

@ -18,8 +18,8 @@ from oslo_log import log
from oslo_utils import netutils
from six.moves.urllib import parse as urlparse
from ceilometer.i18n import _
from ceilometer.storage.hbase import inmemory as hbase_inmemory
from aodh.i18n import _
from aodh.storage.hbase import inmemory as hbase_inmemory
LOG = log.getLogger(__name__)
@ -34,7 +34,7 @@ class Connection(object):
opts = self._parse_connection_url(url)
if opts['host'] == '__test__':
url = os.environ.get('CEILOMETER_TEST_HBASE_URL')
url = os.environ.get('AODH_TEST_HBASE_URL')
if url:
# Reparse URL, but from the env variable now
opts = self._parse_connection_url(url)

View File

@ -20,8 +20,8 @@ import re
from oslo_log import log
import six
import ceilometer
from ceilometer.i18n import _
import aodh
from aodh.i18n import _
LOG = log.getLogger(__name__)
@ -113,7 +113,7 @@ class MTable(object):
# in case of multiple filters
rows = m(fargs, rows)
else:
raise ceilometer.NotImplementedError(
raise aodh.NotImplementedError(
"%s filter is not implemented, "
"you may want to add it!")
for k in sorted(rows)[:limit]:
@ -198,7 +198,7 @@ class MTable(object):
if g == row:
r[row] = data
else:
raise ceilometer.NotImplementedError(
raise aodh.NotImplementedError(
"In-memory "
"RowFilter doesn't support "
"the %s operation yet" % op)
@ -235,7 +235,7 @@ class MTable(object):
(is_regex and re.search(value, key))):
r_data[key] = data[key]
else:
raise ceilometer.NotImplementedError(
raise aodh.NotImplementedError(
"In-memory QualifierFilter "
"doesn't support the %s "
"operation yet" % op)

View File

@ -14,7 +14,7 @@
"""
from ceilometer.storage.hbase import utils as hbase_utils
from aodh.storage.hbase import utils as hbase_utils
def migrate_alarm_history_table(conn, table):

View File

@ -21,8 +21,8 @@ from happybase.hbase import ttypes
from oslo_log import log
import six
from ceilometer.i18n import _
from ceilometer import utils
from aodh.i18n import _
from aodh import utils
LOG = log.getLogger(__name__)

View File

@ -26,7 +26,7 @@ from oslo_log import log
from oslo_utils import netutils
import pymongo
from ceilometer.i18n import _
from aodh.i18n import _
LOG = log.getLogger(__name__)

View File

@ -11,7 +11,7 @@
# under the License.
"""
SQLAlchemy models for Ceilometer data.
SQLAlchemy models for aodh data.
"""
import json
@ -22,7 +22,7 @@ from sqlalchemy.dialects.mysql import DECIMAL
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.types import TypeDecorator
from ceilometer import utils
from aodh import utils
class JSONEncodedDict(TypeDecorator):
@ -72,8 +72,8 @@ class PreciseTimestamp(TypeDecorator):
return value
class CeilometerBase(object):
"""Base class for Ceilometer Models."""
class AodhBase(object):
"""Base class for Aodh Models."""
__table_args__ = {'mysql_charset': "utf8",
'mysql_engine': "InnoDB"}
__table_initialized__ = False
@ -90,7 +90,7 @@ class CeilometerBase(object):
setattr(self, k, v)
Base = declarative_base(cls=CeilometerBase)
Base = declarative_base(cls=AodhBase)
class Alarm(Base):

View File

@ -12,7 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Base class for tests in ceilometer/alarm/evaluator/
"""Base class for tests in aodh/alarm/evaluator/
"""
import mock
from oslotest import base

View File

@ -12,7 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""class for tests in ceilometer/alarm/evaluator/__init__.py
"""class for tests in aodh/alarm/evaluator/__init__.py
"""
import datetime
@ -20,7 +20,7 @@ import mock
from oslo_utils import timeutils
from oslotest import base
from ceilometer.alarm import evaluator
from aodh.alarm import evaluator
class TestEvaluatorBaseClass(base.BaseTestCase):

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
"""Tests for ceilometer/alarm/evaluator/combination.py
"""Tests for aodh/alarm/evaluator/combination.py
"""
import datetime
@ -27,10 +27,10 @@ import mock
from oslo_utils import timeutils
import pytz
from ceilometer.alarm.evaluator import combination
from ceilometer.alarm.storage import models
from ceilometer.tests.alarm.evaluator import base
from ceilometer.tests import constants
from aodh.alarm.evaluator import combination
from aodh.alarm.storage import models
from aodh.tests.alarm.evaluator import base
from aodh.tests import constants
class TestEvaluate(base.TestEvaluatorBase):

View File

@ -25,10 +25,10 @@ import pytz
import six
from six import moves
from ceilometer.alarm.evaluator import gnocchi
from ceilometer.alarm.storage import models
from ceilometer.tests.alarm.evaluator import base
from ceilometer.tests import constants
from aodh.alarm.evaluator import gnocchi
from aodh.alarm.storage import models
from aodh.tests.alarm.evaluator import base
from aodh.tests import constants
class FakeResponse(object):
@ -56,7 +56,7 @@ class TestGnocchiThresholdEvaluate(base.TestEvaluatorBase):
self.useFixture(mockpatch.Patch('ceilometerclient.client.get_client',
return_value=self.api_client))
self.requests = self.useFixture(mockpatch.Patch(
'ceilometer.alarm.evaluator.gnocchi.requests')).mock
'aodh.alarm.evaluator.gnocchi.requests')).mock
def prepare_alarms(self):
self.alarms = [
@ -412,7 +412,7 @@ class TestGnocchiThresholdEvaluate(base.TestEvaluatorBase):
self.assertEqual(expected, self.notifier.notify.call_args_list)
@unittest.skipIf(six.PY3,
"the ceilometer base class is not python 3 ready")
"the aodh base class is not python 3 ready")
@mock.patch.object(timeutils, 'utcnow')
def test_no_state_change_outside_time_constraint(self, mock_utcnow):
self._set_all_alarms('ok')

View File

@ -12,7 +12,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Tests for ceilometer/alarm/evaluator/threshold.py
"""Tests for aodh/alarm/evaluator/threshold.py
"""
import datetime
import uuid
@ -25,10 +25,10 @@ from oslo_utils import timeutils
import pytz
from six import moves
from ceilometer.alarm.evaluator import threshold
from ceilometer.alarm.storage import models
from ceilometer.tests.alarm.evaluator import base
from ceilometer.tests import constants
from aodh.alarm.evaluator import threshold
from aodh.alarm.storage import models
from aodh.tests.alarm.evaluator import base
from aodh.tests import constants
class TestEvaluate(base.TestEvaluatorBase):

View File

@ -12,14 +12,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Tests for ceilometer.alarm.service.SingletonAlarmService.
"""Tests for aodh.alarm.service.SingletonAlarmService.
"""
import mock
from oslo_config import fixture as fixture_config
from stevedore import extension
from ceilometer.alarm import service
from ceilometer.tests import base as tests_base
from aodh.alarm import service
from aodh.tests import base as tests_base
class TestAlarmEvaluationService(tests_base.BaseTestCase):

View File

@ -21,9 +21,9 @@ from oslotest import mockpatch
import requests
import six.moves.urllib.parse as urlparse
from ceilometer import alarm as ceilometer_alarm
from ceilometer.alarm import service
from ceilometer.tests import base as tests_base
from aodh import alarm as aodh_alarm
from aodh.alarm import service
from aodh.tests import base as tests_base
DATA_JSON = jsonutils.loads(
@ -71,7 +71,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
'reason_data': {'fire': 'everywhere'}
}
self.service.notify_alarm(context.get_admin_context(), data)
notifications = ceilometer_alarm.NOTIFIERS['test'].obj.notifications
notifications = aodh_alarm.NOTIFIERS['test'].obj.notifications
self.assertEqual(1, len(notifications))
self.assertEqual((urlparse.urlsplit(data['actions'][0]),
data['alarm_id'],
@ -180,7 +180,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
self.assertEqual(DATA_JSON, jsonutils.loads(kwargs['data']))
def test_notify_alarm_rest_action_with_ssl_verify_disable(self):
action = 'https://host/action?ceilometer-alarm-ssl-verify=0'
action = 'https://host/action?aodh-alarm-ssl-verify=0'
with mock.patch('eventlet.spawn_n', self._fake_spawn_n):
with mock.patch.object(requests.Session, 'post') as poster:
@ -194,7 +194,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
self.assertEqual(DATA_JSON, jsonutils.loads(kwargs['data']))
def test_notify_alarm_rest_action_with_ssl_verify_enable_by_user(self):
action = 'https://host/action?ceilometer-alarm-ssl-verify=1'
action = 'https://host/action?aodh-alarm-ssl-verify=1'
self.CONF.set_override("rest_notifier_ssl_verify", False,
group='alarm')
@ -218,7 +218,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
with mock.patch('oslo_utils.netutils.urlsplit',
self._fake_urlsplit):
LOG = mock.MagicMock()
with mock.patch('ceilometer.alarm.service.LOG', LOG):
with mock.patch('aodh.alarm.service.LOG', LOG):
self.service.notify_alarm(
context.get_admin_context(),
{
@ -230,7 +230,7 @@ class TestAlarmNotifier(tests_base.BaseTestCase):
def test_notify_alarm_invalid_action(self):
LOG = mock.MagicMock()
with mock.patch('ceilometer.alarm.service.LOG', LOG):
with mock.patch('aodh.alarm.service.LOG', LOG):
self.service.notify_alarm(
context.get_admin_context(),
{

View File

@ -21,10 +21,10 @@ from ceilometerclient.v2 import alarms
from oslo_config import fixture as fixture_config
import six
from ceilometer.alarm import rpc as rpc_alarm
from ceilometer.alarm.storage import models
from ceilometer import messaging
from ceilometer.tests import base as tests_base
from aodh.alarm import rpc as rpc_alarm
from aodh.alarm.storage import models
from aodh import messaging
from aodh.tests import base as tests_base
class FakeNotifier(object):

View File

@ -21,7 +21,7 @@ from oslo_policy import opts
import pecan
import pecan.testing
from ceilometer.tests import db as db_test_base
from aodh.tests import db as db_test_base
OPT_GROUP_NAME = 'keystone_authtoken'
cfg.CONF.import_group(OPT_GROUP_NAME, "keystonemiddleware.auth_token")
@ -45,15 +45,15 @@ class FunctionalTest(db_test_base.TestBase):
self.CONF.set_override("auth_version", "v2.0",
group=OPT_GROUP_NAME)
self.CONF.set_override("policy_file",
self.path_get('etc/ceilometer/policy.json'),
self.path_get('etc/aodh/policy.json'),
group='oslo_policy')
self.app = self._make_app()
def _make_app(self, enable_acl=False):
self.config = {
'app': {
'root': 'ceilometer.api.controllers.root.RootController',
'modules': ['ceilometer.api'],
'root': 'aodh.api.controllers.root.RootController',
'modules': ['aodh.api'],
'enable_acl': enable_acl,
},
'wsme': {

View File

@ -20,8 +20,8 @@ from oslo_config import cfg
from oslo_config import fixture as fixture_config
from oslo_log import log
from ceilometer.api import app
from ceilometer.tests import base
from aodh.api import app
from aodh.tests import base
class TestApp(base.BaseTestCase):
@ -37,7 +37,7 @@ class TestApp(base.BaseTestCase):
ff.return_value = None
self.assertRaises(cfg.ConfigFilesNotFoundError, app.load_app)
@mock.patch('ceilometer.storage.get_connection_from_config',
@mock.patch('aodh.storage.get_connection_from_config',
mock.MagicMock())
@mock.patch('pecan.make_app')
def test_pecan_debug(self, mocked):

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from ceilometer.tests import api
from aodh.tests import api
V2_MEDIA_TYPES = [
{

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from ceilometer.tests import api
from aodh.tests import api
class FunctionalTest(api.FunctionalTest):

View File

@ -21,10 +21,10 @@ import json
from oslo_utils import timeutils
import webtest
from ceilometer.api import app
from ceilometer.tests import api as acl
from ceilometer.tests.api import v2
from ceilometer.tests import db as tests_db
from aodh.api import app
from aodh.tests import api as acl
from aodh.tests.api import v2
from aodh.tests import db as tests_db
VALID_TOKEN = '4562138218392831'
VALID_TOKEN2 = '4562138218392832'
@ -90,7 +90,7 @@ class TestAPIACL(v2.FunctionalTest,
def _make_app(self):
self.CONF.set_override("cache", "fake.cache", group=acl.OPT_GROUP_NAME)
file_name = self.path_get('etc/ceilometer/api_paste.ini')
file_name = self.path_get('etc/aodh/api_paste.ini')
self.CONF.set_override("api_paste_config", file_name)
return webtest.TestApp(app.load_app())

View File

@ -25,11 +25,11 @@ import six
from six import moves
import six.moves.urllib.parse as urlparse
from ceilometer.alarm.storage import models
from ceilometer import messaging
from ceilometer.tests.api import v2
from ceilometer.tests import constants
from ceilometer.tests import db as tests_db
from aodh.alarm.storage import models
from aodh import messaging
from aodh.tests.api import v2
from aodh.tests import constants
from aodh.tests import db as tests_db
class TestListEmptyAlarms(v2.FunctionalTest,
@ -2496,7 +2496,7 @@ class TestAlarms(v2.FunctionalTest,
'user_identity': '- - - - -',
'request_id': mock.ANY,
'user_domain': None},
'ceilometer.api', 'alarm.creation',
'aodh.api', 'alarm.creation',
PayloadMatcher(), mock.ANY)
def test_alarm_sends_notification(self):
@ -2513,7 +2513,7 @@ class TestAlarms(v2.FunctionalTest,
self.delete('/alarms/%s' % del_alarm_id,
headers=self.auth_headers, status=204)
get_notifier.assert_called_once_with(mock.ANY,
publisher_id='ceilometer.api')
publisher_id='aodh.api')
calls = notifier.info.call_args_list
self.assertEqual(1, len(calls))
args, _ = calls[0]
@ -2524,7 +2524,7 @@ class TestAlarms(v2.FunctionalTest,
'project_id', 'timestamp', 'type',
'user_id']).issubset(payload.keys()))
@mock.patch('ceilometer.keystone_client.get_client')
@mock.patch('aodh.keystone_client.get_client')
def test_post_gnocchi_resources_alarm(self, __):
json = {
'enabled': False,
@ -2593,7 +2593,7 @@ class TestAlarms(v2.FunctionalTest,
self.assertEqual(1, len(alarms))
self._verify_alarm(json, alarms[0])
@mock.patch('ceilometer.keystone_client.get_client')
@mock.patch('aodh.keystone_client.get_client')
def test_post_gnocchi_metrics_alarm(self, __):
json = {
'enabled': False,
@ -2626,7 +2626,7 @@ class TestAlarms(v2.FunctionalTest,
self.assertEqual(1, len(alarms))
self._verify_alarm(json, alarms[0])
@mock.patch('ceilometer.keystone_client.get_client')
@mock.patch('aodh.keystone_client.get_client')
def test_post_gnocchi_aggregation_alarm_project_constraint(self, __):
self.CONF.set_override('gnocchi_url', 'http://localhost:8041',
group='alarms')

View File

@ -13,7 +13,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Test basic ceilometer-api app
"""Test basic aodh-api app
"""
import json
@ -21,8 +21,8 @@ import mock
import six
import wsme
from ceilometer import i18n
from ceilometer.tests.api import v2
from aodh import i18n
from aodh.tests.api import v2
class TestApiMiddleware(v2.FunctionalTest):
@ -159,7 +159,7 @@ class TestApiMiddleware(v2.FunctionalTest):
json.loads(body)['error_message']
['faultstring'])
with mock.patch('ceilometer.api.controllers.'
with mock.patch('aodh.api.controllers.'
'v2.base.AlarmNotFound') as CustomErrorClass:
CustomErrorClass.return_value = wsme.exc.ClientSideError(
"untranslated_error", status_code=404)

Some files were not shown because too many files have changed in this diff Show More