Index, Guide, & Api Armada Exception Documentation
ARMADA-239: Documentation for validation error codes for Armada 1 of 3 Commits (Remaining Exception Documentation are in separate commits) -guide-exceptions.rst contains the files to include in the documentation. -docs/.../exceptions files contains the format and content of the documenation. -armada/exceptions files were modified in their comments in order to utilize the sphinx-directed method. -Some files were modified to fix typos. Please Note: If the exception is not raised anywhere, it is not included in the documentation. Change-Id: Icfe45f7b8fe116a0adab14e7f9919b46b022f169
This commit is contained in:
parent
dcd68775dc
commit
8b7d1f241b
@ -16,9 +16,14 @@ from armada.exceptions import base_exception as base
|
||||
|
||||
|
||||
class ApiException(base.ArmadaBaseException):
|
||||
'''Base class for API exceptions and error handling.'''
|
||||
'''
|
||||
Base class for API exceptions and error handling.
|
||||
|
||||
message = 'An unknown API error occur.'
|
||||
**Troubleshoot:**
|
||||
*Coming Soon*
|
||||
'''
|
||||
|
||||
message = 'An unknown API error occurred.'
|
||||
|
||||
|
||||
class ApiBaseException(ApiException):
|
||||
@ -34,18 +39,33 @@ class ApiJsonException(ApiException):
|
||||
|
||||
|
||||
class ClientUnauthorizedError(ApiException):
|
||||
'''Exception that occurs during chart cleanup.'''
|
||||
'''
|
||||
Exception that occurs when the server returns a 401 Unauthorized error.
|
||||
|
||||
**Troubleshoot:**
|
||||
*Coming Soon*
|
||||
'''
|
||||
|
||||
message = 'There was an error listing the Helm chart releases.'
|
||||
|
||||
|
||||
class ClientForbiddenError(ApiException):
|
||||
'''Exception that occurs during chart cleanup.'''
|
||||
'''
|
||||
Exception that occurs when the server returns a 403 Forbidden error.
|
||||
|
||||
**Troubleshoot:**
|
||||
*Coming Soon*
|
||||
'''
|
||||
|
||||
message = 'There was an error listing the Helm chart releases.'
|
||||
|
||||
|
||||
class ClientError(ApiException):
|
||||
'''Exception that occurs during chart cleanup.'''
|
||||
'''
|
||||
Exception that occurs when the server returns a 500 Internal Server error.
|
||||
|
||||
**Troubleshoot:**
|
||||
*Coming Soon*
|
||||
'''
|
||||
|
||||
message = 'There was an error listing the Helm chart releases.'
|
||||
|
@ -18,7 +18,7 @@ from armada.exceptions import base_exception
|
||||
class ArmadaException(base_exception.ArmadaBaseException):
|
||||
'''Base class for Armada handler exception and error handling.'''
|
||||
|
||||
message = 'An unknown Armada handler error occured.'
|
||||
message = 'An unknown Armada handler error occurred.'
|
||||
|
||||
|
||||
class KnownReleasesException(ArmadaException):
|
||||
|
@ -46,7 +46,7 @@ class HelmChartBuildException(ChartBuilderException):
|
||||
class IgnoredFilesLoadException(ChartBuilderException):
|
||||
'''Exception that occurs when there is an error loading ignored files.'''
|
||||
|
||||
message = 'An error occured while loading the ignored files in \
|
||||
message = 'An error occurred while loading the ignored files in \
|
||||
.helmignore'
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ from armada.exceptions import base_exception
|
||||
class LintException(base_exception.ArmadaBaseException):
|
||||
'''Base class for linting exceptions and errors.'''
|
||||
|
||||
message = 'An unknown linting error occured.'
|
||||
message = 'An unknown linting error occurred.'
|
||||
|
||||
|
||||
class InvalidManifestException(LintException):
|
||||
@ -30,13 +30,13 @@ class InvalidManifestException(LintException):
|
||||
class InvalidChartNameException(LintException):
|
||||
'''Exception that occurs when an invalid filename is encountered.'''
|
||||
|
||||
message = 'Chart name must be a string,'
|
||||
message = 'Chart name must be a string.'
|
||||
|
||||
|
||||
class InvalidChartDefinitionException(LintException):
|
||||
'''Exception when invalid chart definition is encountered.'''
|
||||
|
||||
message = 'Invalid chart definition.Chart definition must be array.'
|
||||
message = 'Invalid chart definition. Chart definition must be array.'
|
||||
|
||||
|
||||
class InvalidReleaseException(LintException):
|
||||
|
@ -20,7 +20,7 @@ class OverrideException(base_exception.ArmadaBaseException):
|
||||
Base class for Override handler exception and error handling.
|
||||
'''
|
||||
|
||||
message = 'An unknown Override handler error occured.'
|
||||
message = 'An unknown Override handler error occurred.'
|
||||
|
||||
|
||||
class InvalidOverrideTypeException(OverrideException):
|
||||
|
@ -87,7 +87,10 @@ class PreUpdateJobCreateException(TillerException):
|
||||
|
||||
|
||||
class ReleaseException(TillerException):
|
||||
'''Exception that occurs when a release fails to install.'''
|
||||
'''
|
||||
Exception that occurs when a release fails to install, upgrade, delete,
|
||||
or test.
|
||||
'''
|
||||
|
||||
def __init__(self, name, status, action):
|
||||
til_msg = getattr(status.info, 'Description').encode()
|
||||
@ -124,8 +127,9 @@ class GetReleaseContentException(TillerException):
|
||||
|
||||
|
||||
class TillerPodNotFoundException(TillerException):
|
||||
'''Exception that occurs when a tiller pod cannot be found using the
|
||||
labels specified in the Armada config.
|
||||
'''
|
||||
Exception that occurs when a tiller pod cannot be found using the labels
|
||||
specified in the Armada config.
|
||||
'''
|
||||
|
||||
def __init__(self, labels):
|
||||
|
42
docs/source/operations/exceptions/api-exceptions.inc
Normal file
42
docs/source/operations/exceptions/api-exceptions.inc
Normal file
@ -0,0 +1,42 @@
|
||||
..
|
||||
Copyright 2018 AT&T Intellectual Property.
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain
|
||||
a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
.. list-table:: **Api Exceptions**
|
||||
:widths: 5 50
|
||||
:header-rows: 1
|
||||
|
||||
* - Exception Name
|
||||
- Description
|
||||
* - ApiException
|
||||
- .. autoexception:: armada.exceptions.api_exceptions.ApiException
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:undoc-members:
|
||||
* - ClientError
|
||||
- .. autoexception:: armada.exceptions.api_exceptions.ClientError
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:undoc-members:
|
||||
* - ClientForbiddenError
|
||||
- .. autoexception:: armada.exceptions.api_exceptions.ClientForbiddenError
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:undoc-members:
|
||||
* - ClientUnauthorizedError
|
||||
- .. autoexception:: armada.exceptions.api_exceptions.ClientUnauthorizedError
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:undoc-members:
|
20
docs/source/operations/exceptions/guide-exceptions.rst
Normal file
20
docs/source/operations/exceptions/guide-exceptions.rst
Normal file
@ -0,0 +1,20 @@
|
||||
..
|
||||
Copyright 2018 AT&T Intellectual Property.
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain
|
||||
a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Armada Exceptions
|
||||
=================
|
||||
|
||||
.. include:: api-exceptions.inc
|
24
docs/source/operations/exceptions/index.rst
Normal file
24
docs/source/operations/exceptions/index.rst
Normal file
@ -0,0 +1,24 @@
|
||||
..
|
||||
Copyright 2018 AT&T Intellectual Property.
|
||||
All Rights Reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
not use this file except in compliance with the License. You may obtain
|
||||
a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
License for the specific language governing permissions and limitations
|
||||
under the License.
|
||||
|
||||
Exceptions Guide
|
||||
================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
guide-exceptions.rst
|
@ -1,101 +0,0 @@
|
||||
Armada Exceptions
|
||||
=================
|
||||
|
||||
+------------------------+----------------------------------------------------------+
|
||||
| Exception | Error Description |
|
||||
+========================+==========================================================+
|
||||
| KnownReleasesException | Occurs when no known releases are found. |
|
||||
+------------------------+----------------------------------------------------------+
|
||||
|
||||
Tiller Exceptions
|
||||
=================
|
||||
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| Exception | Error Description |
|
||||
+====================================+============================================================================================+
|
||||
| ChartCleanupException | An error occurred removing a chart. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| ListChartsException | An error occurred listing helm charts. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| PostUpdateJobDeleteException | An error occurred deleting a job after an update. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| PostUpdateJobCreateException | An error occurred creating a job after an update. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| PreUpdateJobDeleteException | An error occurred deleting a job before an update. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| PreUpdateJobCreateException | An error occurred creating a job before an update. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| ReleaseUninstallException | A release failed to uninstall. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| ReleaseInstallException | A release failed to install. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| ReleaseUpdateException | A release failed to update. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| TillerPodNotFoundException | Tiller pod could not be found using the labels specified in the Armada config. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| TillerPodNotRunningException | Tiller pod was found but is not in a running state. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
| TillerServicesUnavailableException | Occurs when Tiller services are unavailable. |
|
||||
+------------------------------------+--------------------------------------------------------------------------------------------+
|
||||
|
||||
Chartbuilder Exceptions
|
||||
=======================
|
||||
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
| Exception | Error Description |
|
||||
+=============================+=============================================================+
|
||||
| DepedencyException | A dependency failed to install. |
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
| HelmChartBuildException | An error occurred building the chart. |
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
| IgnoredFilesLoadException | An error occurred loading the ignored files. |
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
| MetadataLoadException | An error occurred loading the metadata for a chart. |
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
| UnknownChartSourceException | The chart source is unknown or invalid. |
|
||||
+-----------------------------+-------------------------------------------------------------+
|
||||
|
||||
Source Exceptions
|
||||
=================
|
||||
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| Exception | Error Description |
|
||||
+==========================+=====================================================================+
|
||||
| GitLocationException | Repository location is not valid. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| SourceCleanupException | The source dir of a chart no longer exists. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| TarballDownloadException | Occurs when the tarball cannot be downloaded from the provided URL. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| TarballExtractException | Occurs when extracting a tarball fails. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| InvalidPathException | Occurs when a non-existent path is accessed. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
| ChartSourceException | Occurs when an unknown chart source type is encountered. |
|
||||
+--------------------------+---------------------------------------------------------------------+
|
||||
|
||||
Lint Exceptions
|
||||
===============
|
||||
+----------------------------------+------------------------------+
|
||||
| Exception | Error Description |
|
||||
+==================================+==============================+
|
||||
| InvalidManifestException | Armada manifest invalid. |
|
||||
+----------------------------------+------------------------------+
|
||||
| InvalidChartNameException | Chart name invalid. |
|
||||
+----------------------------------+------------------------------+
|
||||
| InvalidChartDefinitionException | Chart definition invalid. |
|
||||
+----------------------------------+------------------------------+
|
||||
| InvalidReleaseException | Release invalid. |
|
||||
+----------------------------------+------------------------------+
|
||||
| InvalidArmadaObjectException | Armada object not declared. |
|
||||
+----------------------------------+------------------------------+
|
||||
|
||||
Manifest Exceptions
|
||||
===================
|
||||
+----------------------------------+------------------------------------------------+
|
||||
| Exception | Error Description |
|
||||
+==================================+================================================+
|
||||
| ManifestException | An exception occurred while attempting to build|
|
||||
| | an Armada manifest. The exception will return |
|
||||
| | with details as to why. |
|
||||
+----------------------------------+------------------------------------------------+
|
@ -15,7 +15,7 @@ Operations Guide
|
||||
guide-configure.rst
|
||||
guide-troubleshooting.rst
|
||||
guide-use-armada.rst
|
||||
guide-exceptions.rst
|
||||
exceptions/index
|
||||
guide-helm-plugin.rst
|
||||
sampleconf.rst
|
||||
samplepolicy.rst
|
||||
|
Loading…
x
Reference in New Issue
Block a user