Merge "Revised exception for missing passphrase catalog"

This commit is contained in:
Zuul 2019-04-05 05:42:27 +00:00 committed by Gerrit Code Review
commit fb48f52916
3 changed files with 3 additions and 13 deletions

View File

@ -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:

View File

@ -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):

View File

@ -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 '