#NEWLINE# def make_plugin_section( plugin , base_name ) : #NEWLINE# #INDENT# subcategory_obj = subcategory ( ( '%s [%s]' % ( plugin . get_name ( ) , base_name ) ) ) #NEWLINE# info = plugin . get_info ( ) #NEWLINE# if info [ 'title' ] : #NEWLINE# #INDENT# subcategory_obj . append ( paragraph ( info [ 'title' ] ) ) #NEWLINE# #UNINDENT# if info [ 'description' ] : #NEWLINE# #INDENT# subcategory_obj . extend ( parse_text ( info [ 'description' ] ) ) #NEWLINE# #UNINDENT# if info [ 'namespace' ] : #NEWLINE# #INDENT# subcategory_obj . append ( paragraph ( ( '**Namespace**: %s' % info [ 'namespace' ] ) ) ) #NEWLINE# #UNINDENT# if info [ 'parameters' ] : #NEWLINE# #INDENT# subcategory_obj . extend ( parse_text ( _make_pretty_parameters ( info [ 'parameters' ] ) ) ) #NEWLINE# if info [ 'returns' ] : #NEWLINE# #INDENT# subcategory_obj . extend ( parse_text ( ( '**Returns**:\n%s' % info [ 'returns' ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# filename = info [ 'module' ] . replace ( '.' , '/' ) #NEWLINE# ref = ( 'https://github.com/openstack/rally/blob/master/%s.py' % filename ) #NEWLINE# subcategory_obj . extend ( parse_text ( ( '**Module**:\n`%s`__\n\n__ %s' % ( info [ 'module' ] , ref ) ) ) ) #NEWLINE# return subcategory_obj