Sort drivers listed under feature details

The drivers listed under the feature details are in a semi-random order.
This adds sorting so they match the order they are listed in the table.

Co-Authored-By: Eric Fried <openstack@fried.cc>
Change-Id: Iabd960dda370df8301aa886ccbe0a7fd5011d5bb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-02-05 13:23:24 -06:00
parent 8d6ee5e347
commit ac54bf193f
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
1 changed files with 5 additions and 3 deletions

View File

@ -278,7 +278,8 @@ class Directive(rst.Directive):
summary_head.append(header)
# then one column for each backend driver
impls = sorted(matrix.drivers)
impls = sorted(matrix.drivers,
key=lambda x: matrix.drivers[x].title)
for key in impls:
driver = matrix.drivers[key]
implcol = nodes.entry()
@ -309,7 +310,6 @@ class Directive(rst.Directive):
classes=["sp_feature_" + feature.status]))
# and then one column for each backend driver
impls = sorted(matrix.drivers)
for key in impls:
impl = feature.implementations[key]
impl_col = nodes.entry()
@ -374,7 +374,9 @@ class Directive(rst.Directive):
para_divers.append(nodes.strong(text="Driver Support:"))
# A sub-list giving details of each backend driver
impls = nodes.bullet_list()
for key in feature.implementations:
keys = sorted(feature.implementations,
key=lambda x: matrix.drivers[x].title)
for key in keys:
driver = matrix.drivers[key]
impl = feature.implementations[key]
subitem = nodes.list_item()