b6829d9d8b
* pluggable provisioning mechanism * a lot of old code has been removed * new version of REST API (1.0) * image registry draft implemented as novaclient extension * oslo updated * using oslo.db instead of flask-sqlalchemy * some hacking fixes * using alembic for db migrations Partially implements blueprint pluggable-cluster-provisioning. Partially implements blueprint savanna-rest-api-1-0. Implements blueprint hadoop-image-registry. Implements blueprint fulfill-openstack-requirements. Implements blueprint db-migrate-support. Change-Id: I5df80d67e25c2f4f8367f78f67fb9e9e76fc3647
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
# Copyright (c) 2013 Mirantis Inc.
|
|
#
|
|
# 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 savanna.openstack.common.exception as ex
|
|
|
|
|
|
class SavannaException(ex.ApiError):
|
|
"""Base Exception for the project
|
|
|
|
To correctly use this class, inherit from it and define
|
|
a 'message' and 'code' properties.
|
|
"""
|
|
message = "An unknown exception occurred"
|
|
code = "UNKNOWN_EXCEPTION"
|
|
|
|
def __str__(self):
|
|
return self.message
|
|
|
|
|
|
class NotFoundException(SavannaException):
|
|
|
|
# It could be a various property of object which was not found
|
|
value = None
|
|
|
|
def __init__(self, value):
|
|
self.code = "NOT_FOUND"
|
|
self.value = value
|