# Path: armada/exceptions/base_exception.py
# LOG = logging.getLogger(__name__)
# CONF = cfg.CONF
# class ArmadaBaseException(Exception):
# class ArmadaAPIException(falcon.HTTPError):
# class ActionForbidden(ArmadaAPIException):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, message=None, **kwargs):


from armada.exceptions import base_exception

    def __init__(self, location):
        self._location = location
        self._message = ('Git exception occurred, [', self._location,
                         '] may not be a valid git repository.')

        super(GitException, self).__init__(self._message)


class GitAuthException(SourceException):
    '''Exception that occurs when authentication fails for cloning a repo.'''

    def __init__(self, repo_url, ssh_key_path):
        self._repo_url = repo_url
        self._ssh_key_path = ssh_key_path

        self._message = ('Failed to authenticate for repo {} with ssh-key at '
                         'path {}. Verify the repo exists and the correct ssh '
                         'key path was supplied in the Armada config '
                         'file.').format(self._repo_url, self._ssh_key_path)

        super(GitAuthException, self).__init__(self._message)


class GitProxyException(SourceException):
    '''Exception when an error occurs cloning a Git repository
       through a proxy.'''

    def __init__(self, location):
        self._location = location

# Path: armada/exceptions/base_exception.py
# LOG = logging.getLogger(__name__)
# CONF = cfg.CONF
# class ArmadaBaseException(Exception):
# class ArmadaAPIException(falcon.HTTPError):
# class ActionForbidden(ArmadaAPIException):
#     def __init__(self, message=None, **kwargs):
#     def __init__(self, message=None, **kwargs):


# Path: armada/exceptions/source_exceptions.py
from armada.exceptions import base_exception


    def __init__(self, location):
        self._location = location
        self._message = ('Git exception occurred, [', self._location,
                         '] may not be a valid git repository.')

        super(GitException, self).__init__(self._message)


class GitAuthException(SourceException):
    '''Exception that occurs when authentication fails for cloning a repo.'''

    def __init__(self, repo_url, ssh_key_path):
        self._repo_url = repo_url
        self._ssh_key_path = ssh_key_path

        self._message = ('Failed to authenticate for repo {} with ssh-key at '
                         'path {}. Verify the repo exists and the correct ssh '
                         'key path was supplied in the Armada config '
                         'file.').format(self._repo_url, self._ssh_key_path)

        super(GitAuthException, self).__init__(self._message)


class GitProxyException(SourceException):
    '''Exception when an error occurs cloning a Git repository
       through a proxy.'''

    def __init__(self, location):
        self._location = location

        self._message = ('Could not resolve proxy [', self._location, '].')