Cleanup py27 support and docs

Make a few cleanups:
- Remove obsolete sections from setup.cfg
- Remove install_command from tox.ini, the default
  is fine
- Switch to sphinx-build
- Enable warnings for doc build, fix all warnings
- Remove git handling from conf.py, openstackdocstheme does this now
- Cleanup tox.ini

Change-Id: I51796be20596afc2305c2d8ea189b4037bd28b2d
This commit is contained in:
Andreas Jaeger 2020-04-09 21:20:43 +02:00
parent 7b6075717b
commit 7f2b19452f
7 changed files with 24 additions and 33 deletions

View File

@ -129,11 +129,6 @@ html_theme_options = {}
# pixels large.
#html_favicon = None
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
html_last_updated_fmt = os.popen(git_cmd).read()
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True

View File

@ -1,4 +1,4 @@
openstackdocstheme
openstackdocstheme>=1.32.1
sphinx!=2.1.0,>=2.0.0
stestr>2.0.0 # Apache-2.0
testtools>=0.9.34

View File

@ -10,14 +10,3 @@ classifier =
Intended Audience :: Developers
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
[build_sphinx]
all_files = 1
build-dir = doc/build
source-dir = doc/source
[pbr]
warnerrors = True
[wheel]
universal = 1

View File

@ -100,7 +100,7 @@ Request Attributes
Request:
********
.. code-block:: json
.. code-block:: none
POST /v1/containers/{container_uuid}/secrets
Headers:
@ -115,7 +115,7 @@ Request:
Response:
*********
.. code-block:: json
.. code-block:: none
{
"container_ref": "https://{barbican_host}/v1/containers/{container_uuid}"
@ -150,7 +150,7 @@ containers.
Request:
********
.. code-block:: json
.. code-block:: none
DELETE /v1/containers/{container_uuid}/secrets
Headers:

View File

@ -78,19 +78,19 @@ Examples:
List secrets expiring in the next week (assuming current time is June 8, 2016
20:00 UTC) and sort by secrets expiring soonest:
.. code-block:: json
.. code-block:: none
GET /v1/secrets?expiration=gt:2016-06-08T20:00:00Z,lt:2016-06-15T20:00:00Z&sort=expiration:asc
List secrets created in the previous week assuming same current time as above:
.. code-block:: json
.. code-block:: none
GET /v1/secrets?created=gt:2016-06-01T20:00:00Z,lt:2016-06-08T20:00:00Z
List secrets updated in the previous week assuming same current time as above:
.. code-block:: json
.. code-block:: none
GET /v1/secrets?updated=gt:2016-06-01T20:00:00Z,lt:2016-06-08T20:00:00Z

View File

@ -111,6 +111,8 @@ the resrouce_id refers to an image.
Request
+++++++
::
POST /v1/secrets/{secret_id}/consumers
Headers:
X-Auth-Token: {token}
@ -157,6 +159,8 @@ Parameters
Request
+++++++
::
GET /v1/secrets/{secret_id}/consumers
Headers:
X-Auth-Token: {token}
@ -164,6 +168,9 @@ Request
OK Response
+++++++++++
::
200 OK
{
@ -198,6 +205,8 @@ to access this secret.
Request
+++++++
::
DELETE v1/secrets/{secret_id}/consumers/{resource_id}
Responses
@ -222,7 +231,7 @@ Security impact
Because the consumers are stored in the database, there is the possibility
that a bad actor could add many consumers to try to fill the database disk
space. Secret Consumers should be limited to the same quota as Container
Consumers to mitigate this risk. For example:
Consumers to mitigate this risk. For example::
[quota]
quota_consumers=10000
@ -239,7 +248,7 @@ Python and Command Line Client Impact
-------------------------------------
The Secret class in python-barbicanclient should be updated to add new
methods such as:
methods such as::
class Secret(...):
...
@ -253,7 +262,7 @@ methods such as:
Both methods should raise appropriate exceptions when the API returns an error.
Additionally, the Secret.delete() method should be updated to take a new *force*
parameter and throw an exception when delete() is called with force=False,
and the secret still has consumers:
and the secret still has consumers::
class Secret(...):
...
@ -261,7 +270,7 @@ and the secret still has consumers:
def delete(self, force=False):
...
The CLI client should be changed to add new consumer options, such as:
The CLI client should be changed to add new consumer options, such as::
openstack secret consumer add --service-type=image --resource-type=image \
--resource-id=XXXX-XXXX-XXXX-XXXX
@ -269,12 +278,12 @@ The CLI client should be changed to add new consumer options, such as:
openstack secret consumer remove --service-type=image --resource-type=image \
--resource-id=XXXX-XXXX-XXXX-XXXX
The secret delete command should be changed to take a *--force* parameter:
The secret delete command should be changed to take a *--force* parameter::
openstack secret delete --force {secret_uuid}
This command should return an error when a secret has one or more consumers
and the --force flag is not used:
and the --force flag is not used::
openstack secret delete {secret_uuid_with_consumers}
ERROR: Secret has one or more consumers. Use --force to delete anyway.

View File

@ -4,15 +4,13 @@ envlist = docs
skipsdist = True
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
commands = sphinx-build -W -b html doc/source doc/build/html