Add bandit ID to prefix of more_info link

In a recent commit [1], the names of the plugin doc files changed
to include the bandit ID as a prefix. Unfortunately, the doc_utils
wasn't updated at the time, so it still pointed to the previous
docs, thus resulting in 404 errors when browsing to the link.

This patch modifies doc_utils to properly prefix the bandit ID to
reference the doc for a particular plugin.

[1] https://review.openstack.org/#/c/540170/

Change-Id: Ia4b4c87e880ba39a677a84fc53943bc7a37849ef
Closes-Bug: #1761254
This commit is contained in:
Eric Brown 2018-04-04 16:03:56 -07:00
parent c5fa5e27d9
commit 9d848dd79e
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ def get_url(bid):
info = extension_loader.MANAGER.plugins_by_id.get(bid)
if info is not None:
return BASE_URL + ('plugins/%s.html' % info.plugin.__name__)
return '%splugins/%s_%s.html' % (BASE_URL, bid.lower(),
info.plugin.__name__)
info = extension_loader.MANAGER.blacklist_by_id.get(bid)
if info is not None: