docs: Fix plugin registry generation failures

This patch set fixes plugin registry generation script which
is resulting in the documentation page ending up empty [0].

This is because the script `tools/generate-tempest-plugins-list.sh`
is using an old flag (`-A`).

This drops the `declare -A plugins` command because `plugins` isn't
used anywhere and also uses `decode('utf-8')` on the initial response
lookup for all the projects which is done already in the script
elsewhere [2].

[0] https://docs.openstack.org/tempest/latest/plugin-registry.html
[1] https://bash.cyberciti.biz/bash-reference-manual/Bash-Builtins.html#index-declare-132
[2] da8aec9aed/tools/generate-tempest-plugins-list.py (L67)

Change-Id: I70b59c869df06f35c0f7ca6d20e3584502cda8ef
This commit is contained in:
Felipe Monteiro 2018-11-03 18:20:54 -04:00
parent 2dc72172e4
commit ec4c668764
2 changed files with 2 additions and 3 deletions

View File

@ -74,7 +74,8 @@ r = urllib.urlopen(url)
# Gerrit prepends 4 garbage octets to the JSON, in order to counter
# cross-site scripting attacks. Therefore we must discard it so the
# json library won't choke.
projects = sorted(filter(is_in_openstack_namespace, json.loads(r.read()[4:])))
content = r.read().decode('utf-8')[4:]
projects = sorted(filter(is_in_openstack_namespace, json.loads(content)))
# Retrieve projects having no deb, puppet, ui or spec namespace as those
# namespaces do not contains tempest plugins.

View File

@ -41,8 +41,6 @@
set -ex
(
declare -A plugins
if [[ -r doc/source/data/tempest-plugins-registry.header ]]; then
cat doc/source/data/tempest-plugins-registry.header
fi