Introduced changes:
- pre-commit config and rules
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.
Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.
pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker (check-byte-order-marker);
- Checks that non-binary executables have a proper
shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)
For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks
Change-Id: I35e092c472e5d564ebc9bb6c2a4f6d40b54ff120
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: If5b3ea5c50a91f623b0dd4d1dd347ee8a6b90290
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:
https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html
Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.
This PR also introduces the docs testenv and a doc
requirements.txt file.
Change-Id: If782737efe7114422be9cc3fc586500a2065f07e
Story: 2006072
As part of allowing projects to establish redirects when they move
documentation pages around, we need to let them use .htaccess files.
We only want to allow Redirect and RedirectMatch directives,
though. This change restricts the directives on docs.o.o and adds them
on the static servers used for drafts published during a build (to
allow testing of the redirects).
For more details see:
http://lists.openstack.org/pipermail/openstack-dev/2017-July/120240.html
Change-Id: I256d69f08499549e9e21179eb89f49cda79f7ac7
The context wrapper classes under castellan.common.credentials were
missing an auth_url property resulting in calls to get_endpoint()
failing with 'Could not determine a suitable URL for the plugin' unless
users set barbican/auth_endpoint.
Change-Id: I1be3a1e11e3f4c2170062927ad359bf679eb25d9
Closes-Bug: #1497993
It wasn't clear to me as a newcomer how to init a CONF object with my
own config file. Make the docs more clear around this. Also the
context=None arg to credential_factory is not needed.
Change-Id: Id633718fd19e0fe9b1627b64a2f50d751eeb93a2
As part of the docs migration work[0] for Pike we need to switch to use
the openstackdocstheme.
[0]https://review.openstack.org/#/c/472275/
Change-Id: I56c71ed3efd01b254567fbae5b35f8270261473b
We provide two ways to load castellan-functional.conf, but specify a wrong path
in the repo, this patch fixes that. Also clarify the description in doc.
Change-Id: Id05b11e70a0ed46fcdd922a5f22f86df87b930ae
utils.credential_factory uses 'key_manager' as it's config group rather
than the documented 'castellan'.
Change-Id: Ie2f37fb0ee84cfef9fd1d39f7be5b601c9a86786
DevStack was changed so that keystone uses uwsgi [1]. This
means we can't call keystone with the port number anymore.
1. https://review.openstack.org/#/c/456344/
Change-Id: I349b689e8030c8c2a7313b9781973952ead29c75
The keystoneclient session has been deprecated in favour of
keystoneauth1. To make this cleaner a few unnecessary usages of
keystoneclient are cleaned up.
Change-Id: I8bfcff53165a18f94c600797dd8105d64d948e7a
This patch updates the documents for how to parse configuration
files within Castellan. It is attempting to be consistent with
how other projects achieve the same thing.
Change-Id: Idd0621da37d2ea5193ee0da9e6ee81f803a005cd
This patch adds documentation on using the new credential
object. It is the last of several patches which will implement the
"Allow different Keystone Auth Support in Castellan" blueprint.
Change-Id: I22608e83f46b4cc77ad6a5e41a95389751b0ecbf
Implements: blueprint remove-keystone-dependency
Updates the usage documentation for castellan to explain
how to parse the castellan configuration files.
Change-Id: Iaa93310d7c25ccee47feb85eddf63ae3df1eedca
Allows us to set a breakpoint in code, using pdb.set_trace().
Documentation on how to debug has also been added.
Change-Id: I34bde581ce331b2eb63e4dab08e9f9c597598bf1
This patch adds documentation showing how oslo.context
Request Context can be generated using keystone client. This
documentation will be useful to new Castellan users who are
no familiar with using context.
Change-Id: I60999890cd033808713595087074085bfa915181
This change adds a few samples of the basic usage of Castellan
including; storing, retrieving, and deleting managed objects.
Change-Id: I640f076447da47a57d5186e46b49193e1172d64a
This change adds a module for listing configuration options and setting
their defaults. It also changes the key manager base class to
incorporate a configuration during creation. By default, the key manager
will continue to use the global CONF object from the oslo.config
package.
For the most part, this change will be backwards compatible. The one
exception is the creation of sample configuration files. Previously,
importing castellan was sufficient to add these options to the global
configuration object. Now, these options will need to be applied by
using the castellan.options.list_opts function, or adding them through
other means, to create sample configuration files. Similar applies for
setting configuration before instantiating a key manager.
changes
* adding castellan.options with list_opts and set_defaults functions
* changing KeyManager abc to include a configuration option to __init__
* changing barbican and not_implemented key managers to accept
configuration parameters
* adding tests for set_defaults function
* fixing barbican tests to accomodate new configuration parameter
* adding documentation about configuration usage
* adding castellan configs to oslo entry point in setup.cfg
* adding a genconfig target to tox for producing a sample castellan
configuration file
* adding the sample configuration file to the git ignore
* renaming barbican option api_version to barbican_api_version
Change-Id: I86d6d7d49a893beaae6f311060ec593e0482d889
Implements: blueprint improved-configuration-options