Add a new way of formatting our output in a consistent way. This turns print_list and print_dict into a formatter that has the same API as any other formatter and allows users to create their own formatters and plug them into cratonclient. This includes tests for the base level formatter and our two default formatters as well as some refactoring to allow users to specify their own --format. At the moment, however, the subcommand shells do *not* use the pluggable formatter decided by the user. That change and all of the downstream effects it has on testing is going to be *very* significant and deserves its own commit as this one is large enough. Change-Id: I6649ebce57d5ddf2d4aeb689e77e3c17ef3a2e97
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
[metadata]
 | 
						|
name = python-cratonclient
 | 
						|
summary = Craton API Client and Command-line Utility
 | 
						|
description-file =
 | 
						|
    README.rst
 | 
						|
author = OpenStack
 | 
						|
author-email = openstack-dev@lists.openstack.org
 | 
						|
home-page = http://www.openstack.org/
 | 
						|
classifier =
 | 
						|
    Environment :: OpenStack
 | 
						|
    Intended Audience :: Information Technology
 | 
						|
    Intended Audience :: System Administrators
 | 
						|
    License :: OSI Approved :: Apache Software License
 | 
						|
    Operating System :: POSIX :: Linux
 | 
						|
    Programming Language :: Python
 | 
						|
    Programming Language :: Python :: 2
 | 
						|
    Programming Language :: Python :: 2.7
 | 
						|
    Programming Language :: Python :: 3
 | 
						|
    Programming Language :: Python :: 3.3
 | 
						|
    Programming Language :: Python :: 3.4
 | 
						|
 | 
						|
[files]
 | 
						|
packages =
 | 
						|
    cratonclient
 | 
						|
 | 
						|
[entry_points]
 | 
						|
console_scripts =
 | 
						|
    craton = cratonclient.shell.main:main
 | 
						|
cratonclient.formatters =
 | 
						|
    json = cratonclient.formatters.json_format:Formatter
 | 
						|
    default = cratonclient.formatters.table:Formatter
 | 
						|
 | 
						|
[build_sphinx]
 | 
						|
source-dir = doc/source
 | 
						|
build-dir = doc/build
 | 
						|
all_files = 1
 | 
						|
 | 
						|
[upload_sphinx]
 | 
						|
upload-dir = doc/build/html
 | 
						|
 | 
						|
[compile_catalog]
 | 
						|
directory = cratonclient/locale
 | 
						|
domain = cratonclient
 | 
						|
 | 
						|
[update_catalog]
 | 
						|
domain = cratonclient
 | 
						|
output_dir = cratonclient/locale
 | 
						|
input_file = cratonclient/locale/cratonclient.pot
 | 
						|
 | 
						|
[extract_messages]
 | 
						|
keywords = _ gettext ngettext l_ lazy_gettext
 | 
						|
mapping_file = babel.cfg
 | 
						|
output_file = cratonclient/locale/cratonclient.pot
 |