From e405dc4fd7c95fe4085cda150548db8cbc9f29b7 Mon Sep 17 00:00:00 2001 From: Felipe Monteiro Date: Mon, 29 Oct 2018 19:23:15 +0000 Subject: [PATCH] docs: Document all Pegleg lint codes This adds Pegleg's lint codes to the operator documentation to obviously assist operators with figuring out failing Pegleg lint checks. Change-Id: I6742af48c563f6dd4b4f1d363b678cdcd000347e --- doc/source/index.rst | 1 + doc/source/lint-codes.rst | 59 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 doc/source/lint-codes.rst diff --git a/doc/source/index.rst b/doc/source/index.rst index 9981ceec..f86ed6d7 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -50,4 +50,5 @@ Operator's Guide :maxdepth: 2 cli/cli + lint-codes exceptions diff --git a/doc/source/lint-codes.rst b/doc/source/lint-codes.rst new file mode 100644 index 00000000..21203723 --- /dev/null +++ b/doc/source/lint-codes.rst @@ -0,0 +1,59 @@ +.. + 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. + +.. _lint-codes: + +Lint Codes +========== + +Overview +-------- + +Below are the lint codes that are used by the :ref:`lint ` Pegleg +CLI command. + +Codes +----- + +* P001 - Document has storagePolicy cleartext (expected is encrypted) yet + its schema is a mandatory encrypted type. + + Where mandatory encrypted schema type is one of: + + * ``deckhand/CertificateAuthorityKey/v1`` + * ``deckhand/CertificateKey/v1`` + * ``deckhand/Passphrase/v1`` + * ``deckhand/PrivateKey/v1`` + + See the `Deckhand Utility Document Kinds`_ documentation for more + information. + +* P003 - All repos contain expected directories. +* P004 - Duplicate Deckhand `DataSchema`_ document detected. +* P005 - Deckhand rendering exception. +* P006 - YAML file missing document header (``---``). +* P007 - YAML file is not valid YAML. +* P008 - Document ``metadata.layeringDefinition.layer`` does not match its + location in the site manifests tree (e.g. document with ``site`` layer should + be found in folder named ``site``). +* P009 - Document found in ``secrets`` folder in site manifests repository + but doesn't have ``storagePolicy: encrypted`` set. +* P010 - Site folder in manifests repository is missing + :file:`site-definition.yaml` +* P011 - :file:`site-definition.yaml` failed Pegleg schema validation. + +.. _DataSchema: https://airship-deckhand.readthedocs.io/en/latest/document-types.html?highlight=dataschema#dataschema +.. _Deckhand Utility Document Kinds: https://airship-deckhand.readthedocs.io/en/latest/users/document-types.html#provided-utility-document-kinds