Custom Search

Friday, March 28, 2014

OpenStack Heat oslo.config Example

https://github.com/openstack/heat/blob/master/heat/common/config.py

from oslo.config import cfg
def load_paste_app(app_name=None):
    from pprint import pprint
    print "=========", pprint(vars(cfg.CONF)) <===IMP


============

{'_ConfigOpts__cache': {(None, 'config_dir'): N
one,
                        (None, 'config_file'): ['/etc/heat/heat.conf'],
                        (None, 'debug'): True,
                        (None, 'log_config'): None,
                        (None, 'log_date_format'): '%Y-%m-%d %H:%M:%S',
                        (None, 'log_dir'): None,
                        (None, 'log_file'): None,
                        (None, 'log_format'): None,
                        (None, 'paste_deploy'): ,
                        (None, 'publish_errors'): False,
                        (None, 'use_stderr'): True,
                        (None, 'use_syslog'): False,
                        ('paste_deploy', 'api_paste_config'): 'api-paste.ini',
                        ('paste_deploy', 'flavor'): None},
 '_args': ['--config-file=/etc/heat/heat.conf'],
 '_config_opts': [,
                  ],
 '_groups': {'auth_password': ,
             'heat_api': ,
             'heat_api_cfn': ,
             'heat_api_cloudwatch': ,
             'paste_deploy': },
 '_namespace': _Namespace(conf=, config_dir=None, config_file=['/etc/heat/heat.conf'], debug=Tr
ue, files_not_found=[], log_config=None, log_date_format=None, log_dir=None, log_file=None, log_format=None, parser=er object at 0x12561d0>, syslog_log_facility=None, use_syslog=False, verbose=None),
 '_oparser': _CachedArgumentParser(prog='heat-api', usage=None, description=None, version=None, formatter_class=, co
nflict_handler='error', add_help=True),
 '_opts': {'allowed_rpc_exception_modules': {'cli': False,
                                             'opt': },
           'config_dir': {'cli': True,
                          'opt': },
           'config_file': {'cli': True,
                           'opt': },
           'control_exchange': {'cli': False,
                                'opt': },
           'debug': {'cli': True,
                     'opt': },
           'default_log_levels': {'cli': False,
                                  'opt': },
           'deferred_auth_method': {'cli': False,
                                    'opt': },
           'environment_dir': {'cli': False,
                               'opt': },
           'event_purge_batch_size': {'cli': False,
                                      'opt': },
           'fake_rabbit': {'cli': False,
                           'opt': },
           'fatal_deprecations': {'cli': False,
                                  'opt': },
           'heat_metadata_server_url': {'cli': False,
                                        'opt': },
           'heat_stack_user_role': {'cli': False,
                                    'opt': },
           'heat_waitcondition_server_url': {'cli': False,
                                             'opt': },
           'heat_watch_server_url': {'cli': False,
                                     'opt': },
           'host': {'cli': False,
                    'opt': },
           'instance_connection_https_validate_certificates': {'cli': False,
                                                               'opt': },
           'instance_connection_is_secure': {'cli': False,
                                             'opt': },
           'instance_driver': {'cli': False,
                               'opt': },
           'instance_format': {'cli': False,
                               'opt': },
           'instance_user': {'cli': False,
                             'opt': },
           'instance_uuid_format': {'cli': False,
                                    'opt': },
           'log_config': {'cli': True,
                          'opt': },
           'log_date_format': {'cli': True,
                               'opt': },
           'log_dir': {'cli': True,
                       'opt': },
           'log_file': {'cli': True,
                        'opt': },
           'log_format': {'cli': True,
                          'opt': },
           'logging_context_format_string': {'cli': False,
                                             'opt': },
           'logging_debug_format_suffix': {'cli': False,
                                           'opt': },
           'logging_default_format_string': {'cli': False,
                                             'opt': },
           'logging_exception_prefix': {'cli': False,
                                        'opt': },
           'max_events_per_stack': {'cli': False,
                                    'opt': },
           'max_json_body_size': {'cli': False,
                                  'opt': },
           'max_nested_stack_depth': {'cli': False,
                                      'opt': },
           'max_resources_per_stack': {'cli': False,
                                       'opt': },
           'max_stacks_per_tenant': {'cli': False,
                                     'opt': },
           'max_template_size': {'cli': False,
                                 'opt': },
           'periodic_interval': {'cli': False,
                                 'opt': },
           'plugin_dirs': {'cli': False,
                           'opt': },
           'publish_errors': {'cli': False,
                              'opt': },
           'rpc_backend': {'cli': False,
                           'opt': },
           'rpc_cast_timeout': {'cli': False,
                                'opt': },
           'rpc_conn_pool_size': {'cli': False,
                                  'opt': },
           'rpc_response_timeout': {'cli': False,
                                    'opt': },
           'rpc_thread_pool_size': {'cli': False,
                                    'opt': },
           'sql_connection': {'cli': False,
                              'opt': },
           'sql_idle_timeout': {'cli': False,
                                'opt': },
           'syslog_log_facility': {'cli': True,
                                   'opt': },
           'trusts_delegated_roles': {'cli': False,
                                      'opt': },
           'use_stderr': {'cli': False,
                          'opt': },
           'use_syslog': {'cli': True,
                          'opt': },
           'verbose': {'cli': True,
                       'opt': }},
 '_validate_default_values': False,
 'default_config_files': ['/etc/heat/heat.conf'],
 'default_log_levels': ['amqplib=WARN',
                        'qpid.messaging=INFO',
                        'keystone=INFO',
                        'eventlet.wsgi.server=WARN'],
 'prog': 'heat-api',
 'project': 'heat',
 'usage': None,
 'version': None}

          

No comments:

Post a Comment