summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-14 22:03:37 +0000
committerGerrit Code Review <review@openstack.org>2018-06-14 22:03:37 +0000
commitf2664063253d061d92766b5a17e1300c1eb782a4 (patch)
treedd421313f21ad61bfe68ca1ff94e1c39db35a4db
parent90ef10924d8d972229652c4225fbdc5cc96198e6 (diff)
parent113b383196c1aa80cb0803cbd7545a75a5eb507e (diff)
Merge "Clean output of driver list generation"
-rwxr-xr-xtools/generate_driver_list.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/generate_driver_list.py b/tools/generate_driver_list.py
index 3285f2f..e35d810 100755
--- a/tools/generate_driver_list.py
+++ b/tools/generate_driver_list.py
@@ -17,6 +17,7 @@
17import argparse 17import argparse
18import os 18import os
19import json 19import json
20import textwrap
20 21
21from cinder.interface import util 22from cinder.interface import util
22from cinder import objects 23from cinder import objects
@@ -68,9 +69,9 @@ class Output(object):
68def format_description(desc, output): 69def format_description(desc, output):
69 desc = desc or '<None>' 70 desc = desc or '<None>'
70 lines = desc.rstrip('\n').split('\n') 71 lines = desc.rstrip('\n').split('\n')
71 for line in lines: 72 output.write('* Description: %s' % lines[0])
72 output.write(' %s' % line) 73 output.write('')
73 74 output.write(textwrap.dedent('\n'.join(lines[1:])))
74 75
75def print_drivers(drivers, config_name, output): 76def print_drivers(drivers, config_name, output):
76 for driver in sorted(drivers, key=lambda x: x.class_fqn): 77 for driver in sorted(drivers, key=lambda x: x.class_fqn):
@@ -85,7 +86,6 @@ def print_drivers(drivers, config_name, output):
85 if driver.ci_wiki_name and 'Cinder_Jenkins' not in driver.ci_wiki_name: 86 if driver.ci_wiki_name and 'Cinder_Jenkins' not in driver.ci_wiki_name:
86 output.write('* CI info: %s%s' % (CI_WIKI_ROOT, 87 output.write('* CI info: %s%s' % (CI_WIKI_ROOT,
87 driver.ci_wiki_name)) 88 driver.ci_wiki_name))
88 output.write('* Description:')
89 format_description(driver.desc, output) 89 format_description(driver.desc, output)
90 output.write('') 90 output.write('')
91 output.write('') 91 output.write('')