"Fossies" - the Fresh Open Source Software Archive

Member "tacker-2.0.0/tacker/keymgr/exception.py" (16 Oct 2019, 1464 Bytes) of package /linux/misc/openstack/tacker-2.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "exception.py" see the Fossies "Dox" file reference documentation.

    1 # Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
    2 # All Rights Reserved.
    3 #
    4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
    5 #    not use this file except in compliance with the License. You may obtain
    6 #    a copy of the License at
    7 #
    8 #         http://www.apache.org/licenses/LICENSE-2.0
    9 #
   10 #    Unless required by applicable law or agreed to in writing, software
   11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   13 #    License for the specific language governing permissions and limitations
   14 #    under the License.
   15 
   16 """
   17 Exception for keymgr
   18 """
   19 
   20 from tacker._i18n import _
   21 from tacker.common.exceptions import TackerException
   22 
   23 
   24 class Forbidden(TackerException):
   25     message = _("You are not authorized to complete this action.")
   26 
   27 
   28 class KeyManagerError(TackerException):
   29     message = _("Key manager error: %(reason)s")
   30 
   31 
   32 class ManagedObjectNotFoundError(TackerException):
   33     message = _("Key not found, uuid: %(uuid)s")
   34 
   35 
   36 class AuthTypeInvalidError(TackerException):
   37     message = _("Invalid auth_type was specified, auth_type: %(type)s")
   38 
   39 
   40 class InsufficientCredentialDataError(TackerException):
   41     message = _('Insufficient credential data was provided, either '
   42                 '"token" must be set in the passed conf, or a context '
   43                 'with an "auth_token" property must be passed.')