# Path: aodh/i18n.py
# DOMAIN = 'aodh'
# def translate(value, user_locale):
# def get_available_languages():
# 
# Path: aodh/utils.py
# def get_func_valid_keys(func):
#     return inspect.getfullargspec(func)[0]


import ast
import datetime
import functools
import pecan
import wsme
from oslo_utils import strutils
from oslo_utils import timeutils
from wsme import types as wtypes
from aodh.i18n import _
from aodh.utils import get_func_valid_keys
# 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.





operation_kind = ('lt', 'le', 'eq', 'ne', 'ge', 'gt')
operation_kind_enum = wtypes.Enum(str, *operation_kind)


class ClientSideError(wsme.exc.ClientSideError):
    def __init__(self, error, status_code=400):
        pecan.response.translatable_error = error
        super(ClientSideError, self).__init__(error, status_code)


class ProjectNotAuthorized(ClientSideError):
    def __init__(self, id, aspect='project'):
        params = dict(aspect=aspect, id=id)
        super(ProjectNotAuthorized, self).__init__(

# Path: aodh/i18n.py
# DOMAIN = 'aodh'
# def translate(value, user_locale):
# def get_available_languages():
# 
# Path: aodh/utils.py
# def get_func_valid_keys(func):
#     return inspect.getfullargspec(func)[0]


# Path: aodh/api/controllers/v2/base.py
import ast
import datetime
import functools
import pecan
import wsme
from oslo_utils import strutils
from oslo_utils import timeutils
from wsme import types as wtypes
from aodh.i18n import _
from aodh.utils import get_func_valid_keys

# 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.





operation_kind = ('lt', 'le', 'eq', 'ne', 'ge', 'gt')
operation_kind_enum = wtypes.Enum(str, *operation_kind)


class ClientSideError(wsme.exc.ClientSideError):
    def __init__(self, error, status_code=400):
        pecan.response.translatable_error = error
        super(ClientSideError, self).__init__(error, status_code)


class ProjectNotAuthorized(ClientSideError):
    def __init__(self, id, aspect='project'):
        params = dict(aspect=aspect, id=id)
        super(ProjectNotAuthorized, self).__init__(

            _("Not Authorized to access %(aspect)s %(id)s") % params,