def _dict_with_qos_specs(rows):
 result = []
 for row in rows:
  if (row['key'] == 'QoS_Specs_Name'):
   member = {'name': row['value'], 'id': row['id']}
   if row.specs:
    spec_dict = _dict_with_children_specs(row.specs)
    member['consumer'] = spec_dict.pop('consumer')
    member.update(dict(specs=spec_dict))
   result.append(member)
 return result

def _dict_with_qos_specs ( rows ) : result = [ ] for row in rows : if ( row [ 'key' ] == 'QoS_Specs_Name' ) : member = { 'name' : row [ 'value' ] , 'id' : row [ 'id' ] } if row . specs : spec_dict = _dict_with_children_specs ( row . specs ) member [ 'consumer' ] = spec_dict . pop ( 'consumer' ) member . update ( dict ( specs = spec_dict ) ) result . append ( member ) return result
convert qos specs query results to list .