#NEWLINE# def setup_config( config_file = '' ) : #NEWLINE# #INDENT# global TEST_CONF #NEWLINE# TEST_CONF = cfg . ConfigOpts ( ) #NEWLINE# identity_group = cfg . OptGroup ( name = 'identity' ) #NEWLINE# identity_options = [ cfg . StrOpt ( 'uri' , default = 'http://localhost:5000/v2.0' ) , cfg . StrOpt ( 'uri_v3' , default = 'http://localhost:5000/v3' ) , cfg . StrOpt ( 'auth_version' , default = 'v3' ) , cfg . StrOpt ( 'username' , default = 'admin' ) , cfg . StrOpt ( 'password' , default = 'secretadmin' ) , cfg . StrOpt ( 'tenant_name' , default = 'admin' ) , cfg . StrOpt ( 'domain_name' , default = 'Default' ) , cfg . StrOpt ( 'admin_username' , default = 'admin' ) , cfg . StrOpt ( 'admin_password' , default = 'secretadmin' ) , cfg . StrOpt ( 'admin_tenant_name' , default = 'admin' ) , cfg . StrOpt ( 'admin_domain_name' , default = 'Default' ) ] #NEWLINE# TEST_CONF . register_group ( identity_group ) #NEWLINE# TEST_CONF . register_opts ( identity_options , group = identity_group ) #NEWLINE# keymanager_group = cfg . OptGroup ( name = 'keymanager' ) #NEWLINE# keymanager_options = [ cfg . StrOpt ( 'url' , default = 'http://localhost:9311' ) , cfg . StrOpt ( 'username' , default = 'admin' ) , cfg . StrOpt ( 'password' , default = 'secretadmin' ) , cfg . StrOpt ( 'project_name' , default = 'admin' ) , cfg . StrOpt ( 'project_id' , default = 'admin' ) , cfg . StrOpt ( 'project_domain_name' , default = 'Default' ) , cfg . IntOpt ( 'max_payload_size' , default = 10000 ) ] #NEWLINE# TEST_CONF . register_group ( keymanager_group ) #NEWLINE# TEST_CONF . register_opts ( keymanager_options , group = keymanager_group ) #NEWLINE# config_to_load = [ ] #NEWLINE# local_config = './etc/functional_tests.conf' #NEWLINE# devstack_config = '../etc/functional_tests.conf' #NEWLINE# if os . path . isfile ( config_file ) : #NEWLINE# #INDENT# config_to_load . append ( config_file ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if os . path . isfile ( local_config ) : #NEWLINE# #INDENT# config_to_load . append ( local_config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if os . path . isfile ( devstack_config ) : #NEWLINE# #INDENT# config_to_load . append ( devstack_config ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# config_to_load . append ( '/etc/functional_tests.conf' ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# TEST_CONF ( ( ) , default_config_files = config_to_load )