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. # pixels large.
#html_favicon = None #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 # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.
#html_use_smartypants = True #html_use_smartypants = True

View File

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

View File

@ -10,14 +10,3 @@ classifier =
Intended Audience :: Developers Intended Audience :: Developers
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux 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: Request:
******** ********
.. code-block:: json .. code-block:: none
POST /v1/containers/{container_uuid}/secrets POST /v1/containers/{container_uuid}/secrets
Headers: Headers:
@ -115,7 +115,7 @@ Request:
Response: Response:
********* *********
.. code-block:: json .. code-block:: none
{ {
"container_ref": "https://{barbican_host}/v1/containers/{container_uuid}" "container_ref": "https://{barbican_host}/v1/containers/{container_uuid}"
@ -150,7 +150,7 @@ containers.
Request: Request:
******** ********
.. code-block:: json .. code-block:: none
DELETE /v1/containers/{container_uuid}/secrets DELETE /v1/containers/{container_uuid}/secrets
Headers: Headers:

View File

@ -78,19 +78,19 @@ Examples:
List secrets expiring in the next week (assuming current time is June 8, 2016 List secrets expiring in the next week (assuming current time is June 8, 2016
20:00 UTC) and sort by secrets expiring soonest: 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 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: 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 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: 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 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 Request
+++++++ +++++++
::
POST /v1/secrets/{secret_id}/consumers POST /v1/secrets/{secret_id}/consumers
Headers: Headers:
X-Auth-Token: {token} X-Auth-Token: {token}
@ -157,6 +159,8 @@ Parameters
Request Request
+++++++ +++++++
::
GET /v1/secrets/{secret_id}/consumers GET /v1/secrets/{secret_id}/consumers
Headers: Headers:
X-Auth-Token: {token} X-Auth-Token: {token}
@ -164,6 +168,9 @@ Request
OK Response OK Response
+++++++++++ +++++++++++
::
200 OK 200 OK
{ {
@ -198,6 +205,8 @@ to access this secret.
Request Request
+++++++ +++++++
::
DELETE v1/secrets/{secret_id}/consumers/{resource_id} DELETE v1/secrets/{secret_id}/consumers/{resource_id}
Responses Responses
@ -222,7 +231,7 @@ Security impact
Because the consumers are stored in the database, there is the possibility 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 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 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]
quota_consumers=10000 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 The Secret class in python-barbicanclient should be updated to add new
methods such as: methods such as::
class Secret(...): class Secret(...):
... ...
@ -253,7 +262,7 @@ methods such as:
Both methods should raise appropriate exceptions when the API returns an error. 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* 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, 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(...): class Secret(...):
... ...
@ -261,7 +270,7 @@ and the secret still has consumers:
def delete(self, force=False): 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 \ openstack secret consumer add --service-type=image --resource-type=image \
--resource-id=XXXX-XXXX-XXXX-XXXX --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 \ openstack secret consumer remove --service-type=image --resource-type=image \
--resource-id=XXXX-XXXX-XXXX-XXXX --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} openstack secret delete --force {secret_uuid}
This command should return an error when a secret has one or more consumers 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} openstack secret delete {secret_uuid_with_consumers}
ERROR: Secret has one or more consumers. Use --force to delete anyway. ERROR: Secret has one or more consumers. Use --force to delete anyway.

View File

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