Revised exception for missing passphrase catalog
The exception raised on attempting to generate passphrases without a passphrase catalog has been revised from a PassphraseSchemaNotFoundException to a PassphraseCatalogNotFoundException Change-Id: Ifbb2903638ffffe5008db52adb6f874bcfa25a99
This commit is contained in:
parent
e3e5683765
commit
f938029b36
@ -84,11 +84,6 @@ Genesis Bundle Exceptions
|
||||
Passphrase Exceptions
|
||||
---------------------
|
||||
|
||||
.. autoexception:: pegleg.engine.exceptions.PassphraseSchemaNotFoundException
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:undoc-members:
|
||||
|
||||
.. autoexception:: pegleg.engine.exceptions.PassphraseCatalogNotFoundException
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
@ -15,7 +15,7 @@
|
||||
import logging
|
||||
|
||||
from pegleg.engine.catalogs.base_catalog import BaseCatalog
|
||||
from pegleg.engine.exceptions import PassphraseSchemaNotFoundException
|
||||
from pegleg.engine.exceptions import PassphraseCatalogNotFoundException
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
KIND = 'PassphraseCatalog'
|
||||
@ -45,12 +45,12 @@ class PassphraseCatalog(BaseCatalog):
|
||||
|
||||
:param str sitename: Name of the environment
|
||||
:param list documents: Environment configuration documents
|
||||
:raises PassphraseSchemaNotFoundException: If it cannot find a
|
||||
:raises PassphraseCatalogNotFoundException: If it cannot find a
|
||||
``pegleg/passphraseCatalog/v1`` document.
|
||||
"""
|
||||
super(PassphraseCatalog, self).__init__(KIND, sitename, documents)
|
||||
if not self._catalog_docs:
|
||||
raise PassphraseSchemaNotFoundException()
|
||||
raise PassphraseCatalogNotFoundException()
|
||||
|
||||
@property
|
||||
def get_passphrase_names(self):
|
||||
|
@ -77,11 +77,6 @@ class IncompletePKIPairError(PeglegBaseException):
|
||||
message = ("Incomplete keypair set %(kinds)s for name: %(name)s")
|
||||
|
||||
|
||||
class PassphraseSchemaNotFoundException(PeglegBaseException):
|
||||
"""Failed to find schema for Passphrases rendering."""
|
||||
message = ('Could not find Passphrase schema for rendering Passphrases!')
|
||||
|
||||
|
||||
class PassphraseCatalogNotFoundException(PeglegBaseException):
|
||||
"""Failed to find Catalog for Passphrases generation."""
|
||||
message = ('Could not find the Passphrase Catalog to generate '
|
||||
|
Loading…
x
Reference in New Issue
Block a user