How to use the hvac.exceptions.VaultError function in hvac

To help you get started, we’ve selected a few hvac examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hvac / hvac / hvac / exceptions.py View on Github external
class VaultError(Exception):
    def __init__(self, message=None, errors=None):
        if errors:
            message = ', '.join(errors)

        self.errors = errors

        super(VaultError, self).__init__(message)


class InvalidRequest(VaultError):
    pass


class Unauthorized(VaultError):
    pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
github hvac / hvac / hvac / exceptions.py View on Github external
pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
    pass


class VaultDown(VaultError):
    pass


class UnexpectedError(VaultError):
    pass


class ParamValidationError(VaultError):
    pass
github hvac / hvac / hvac / exceptions.py View on Github external
message = ', '.join(errors)

        self.errors = errors

        super(VaultError, self).__init__(message)


class InvalidRequest(VaultError):
    pass


class Unauthorized(VaultError):
    pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
github hvac / hvac / hvac / exceptions.py View on Github external
pass


class Unauthorized(VaultError):
    pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
    pass


class VaultDown(VaultError):
    pass


class UnexpectedError(VaultError):
github hvac / hvac / hvac / exceptions.py View on Github external
def __init__(self, message=None, errors=None):
        if errors:
            message = ', '.join(errors)

        self.errors = errors

        super(VaultError, self).__init__(message)
github hvac / hvac / hvac / exceptions.py View on Github external
class VaultError(Exception):
    def __init__(self, message=None, errors=None):
        if errors:
            message = ', '.join(errors)

        self.errors = errors

        super(VaultError, self).__init__(message)


class InvalidRequest(VaultError):
    pass


class Unauthorized(VaultError):
    pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
github bosondata / badwolf / badwolf / pipeline.py View on Github external
def _populate_envvars_from_vault(self):
        if self.vault is None or not self.spec.vault.env:
            return

        paths = [v[0] for v in self.spec.vault.env.values()]
        secrets = {}
        for path in paths:
            try:
                res = self.vault.read(path)
            except VaultError as exc:
                raise InvalidSpecification('Error reading {} from Vault: {}'.format(path, str(exc)))
            if not res:
                raise InvalidSpecification('Error reading {} from Vault: not found'.format(path))
            secrets[path] = res['data']

        for name, (path, key) in self.spec.vault.env.items():
            val = secrets.get(path, {}).get(key)
            if val is not None:
                self.context.environment.setdefault(name, val)
github hvac / hvac / hvac / exceptions.py View on Github external
super(VaultError, self).__init__(message)


class InvalidRequest(VaultError):
    pass


class Unauthorized(VaultError):
    pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
    pass


class VaultDown(VaultError):
github hvac / hvac / hvac / exceptions.py View on Github external
pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
    pass


class VaultDown(VaultError):
    pass


class UnexpectedError(VaultError):
    pass


class ParamValidationError(VaultError):
    pass
github hvac / hvac / hvac / exceptions.py View on Github external
pass


class Forbidden(VaultError):
    pass


class InvalidPath(VaultError):
    pass


class RateLimitExceeded(VaultError):
    pass


class InternalServerError(VaultError):
    pass


class VaultNotInitialized(VaultError):
    pass


class VaultDown(VaultError):
    pass


class UnexpectedError(VaultError):
    pass


class ParamValidationError(VaultError):