Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ò’EYc@sÓdZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
ddlZddlmZddlmZmZddlmZddlmZejeƒZdefd	„ƒYZd
efd„ƒYZdefd
„ƒYZdeefd„ƒYZdefd„ƒYZdefd„ƒYZ defd„ƒYZ!defd„ƒYZ"defd„ƒYZ#defd„ƒYZ$defd„ƒYZ%defd„ƒYZ&d ee'fd!„ƒYZ(d"ee'fd#„ƒYZ)d$„Z*e+d%„Z,d&d'„Z-e+e+d(d)„Z.d*„Z/d+„Z0d,„Z1ej2d-e3fd.„ƒYƒZ4d/e3fd0„ƒYZ5d1e4fd2„ƒYZ6d3e4fd4„ƒYZ7d5e4fd6„ƒYZ8d7e4fd8„ƒYZ9d9e4fd:„ƒYZ:d;e4fd<„ƒYZ;d=e4fd>„ƒYZ<d?e4fd@„ƒYZ=dAe4fdB„ƒYZ>dCe4fdD„ƒYZ?dEe4fdF„ƒYZ@dGe@fdH„ƒYZAdIe4fdJ„ƒYZBdKe4fdL„ƒYZCdMe4fdN„ƒYZDdOe3fdP„ƒYZEdQejFfdR„ƒYZFdSejGfdT„ƒYZHe
jIdUdVdWdXƒdYe3fdZ„ƒYƒZJd[ejKfd\„ƒYZLd]ejMfd^„ƒYZNd_ejOfd`„ƒYZPePƒZQdS(asÇ-
Configuration options may be set on the command line or in config files.

The schema for each option is defined using the
:class:`Opt` class or its sub-classes, for example:

::

    from oslo_config import cfg
    from oslo_config import types

    PortType = types.Integer(1, 65535)

    common_opts = [
        cfg.StrOpt('bind_host',
                   default='0.0.0.0',
                   help='IP address to listen on.'),
        cfg.Opt('bind_port',
                type=PortType,
                default=9292,
                help='Port number to listen on.')
    ]

Option Types
------------

Options can have arbitrary types via the `type` parameter to the :class:`Opt`
constructor. The `type` parameter is a callable object that takes a string and
either returns a value of that particular type or raises :class:`ValueError` if
the value can not be converted.

For convenience, there are predefined option subclasses in
:mod:`oslo_config.cfg` that set the option `type` as in the following table:

====================================  ======
Type                                  Option
====================================  ======
:class:`oslo_config.types.String`     - :class:`oslo_config.cfg.StrOpt`
                                      - :class:`oslo_config.cfg.SubCommandOpt`
:class:`oslo_config.types.Boolean`    :class:`oslo_config.cfg.BoolOpt`
:class:`oslo_config.types.Integer`    - :class:`oslo_config.cfg.IntOpt`
                                      - :class:`oslo_config.cfg.PortOpt`
:class:`oslo_config.types.Float`      :class:`oslo_config.cfg.FloatOpt`
:class:`oslo_config.types.List`       :class:`oslo_config.cfg.ListOpt`
:class:`oslo_config.types.Dict`       :class:`oslo_config.cfg.DictOpt`
:class:`oslo_config.types.IPAddress`  :class:`oslo_config.cfg.IPOpt`
:class:`oslo_config.types.Hostname`   :class:`oslo_config.cfg.HostnameOpt`
:class:`oslo_config.types.URI`        :class:`oslo_config.cfg.URIOpt`
====================================  ======

For :class:`oslo_config.cfg.MultiOpt` the `item_type` parameter defines
the type of the values. For convenience, :class:`oslo_config.cfg.MultiStrOpt`
is :class:`~oslo_config.cfg.MultiOpt` with the `item_type` parameter set to
:class:`oslo_config.types.MultiString`.

The following example defines options using the convenience classes::

    enabled_apis_opt = cfg.ListOpt('enabled_apis',
                                   default=['ec2', 'osapi_compute'],
                                   help='List of APIs to enable by default.')

    DEFAULT_EXTENSIONS = [
        'nova.api.openstack.compute.contrib.standard_extensions'
    ]
    osapi_compute_extension_opt = cfg.MultiStrOpt('osapi_compute_extension',
                                                  default=DEFAULT_EXTENSIONS)

Registering Options
-------------------

Option schemas are registered with the config manager at runtime, but before
the option is referenced::

    class ExtensionManager(object):

        enabled_apis_opt = cfg.ListOpt(...)

        def __init__(self, conf):
            self.conf = conf
            self.conf.register_opt(enabled_apis_opt)
            ...

        def _load_extensions(self):
            for ext_factory in self.conf.osapi_compute_extension:
                ....

A common usage pattern is for each option schema to be defined in the module or
class which uses the option::

    opts = ...

    def add_common_opts(conf):
        conf.register_opts(opts)

    def get_bind_host(conf):
        return conf.bind_host

    def get_bind_port(conf):
        return conf.bind_port

An option may optionally be made available via the command line. Such options
must be registered with the config manager before the command line is parsed
(for the purposes of --help and CLI arg validation)::

    cli_opts = [
        cfg.BoolOpt('verbose',
                    short='v',
                    default=False,
                    help='Print more verbose output.'),
        cfg.BoolOpt('debug',
                    short='d',
                    default=False,
                    help='Print debugging output.'),
    ]

    def add_common_opts(conf):
        conf.register_cli_opts(cli_opts)

Loading Config Files
--------------------

The config manager has two CLI options defined by default, --config-file
and --config-dir::

    class ConfigOpts(object):

        def __call__(self, ...):

            opts = [
                MultiStrOpt('config-file',
                        ...),
                StrOpt('config-dir',
                       ...),
            ]

            self.register_cli_opts(opts)

Option values are parsed from any supplied config files using
oslo_config.iniparser. If none are specified, a default set is used
for example glance-api.conf and glance-common.conf::

    glance-api.conf:
      [DEFAULT]
      bind_port = 9292

    glance-common.conf:
      [DEFAULT]
      bind_host = 0.0.0.0

Option values in config files and those on the command line are parsed
in order. The same option (includes deprecated option name and current
option name) can appear many times, in config files or on the command line.
Later values always override earlier ones.

The order of configuration files inside the same configuration directory is
defined by the alphabetic sorting order of their file names.

The parsing of CLI args and config files is initiated by invoking the config
manager for example::

    conf = cfg.ConfigOpts()
    conf.register_opt(cfg.BoolOpt('verbose', ...))
    conf(sys.argv[1:])
    if conf.verbose:
        ...

Option Groups
-------------

Options can be registered as belonging to a group::

    rabbit_group = cfg.OptGroup(name='rabbit',
                                title='RabbitMQ options')

    rabbit_host_opt = cfg.StrOpt('host',
                                 default='localhost',
                                 help='IP/hostname to listen on.'),
    rabbit_port_opt = cfg.PortOpt('port',
                                  default=5672,
                                  help='Port number to listen on.')

    def register_rabbit_opts(conf):
        conf.register_group(rabbit_group)
        # options can be registered under a group in either of these ways:
        conf.register_opt(rabbit_host_opt, group=rabbit_group)
        conf.register_opt(rabbit_port_opt, group='rabbit')

If no group attributes are required other than the group name, the group
need not be explicitly registered for example::

    def register_rabbit_opts(conf):
        # The group will automatically be created, equivalent calling::
        #   conf.register_group(OptGroup(name='rabbit'))
        conf.register_opt(rabbit_port_opt, group='rabbit')

If no group is specified, options belong to the 'DEFAULT' section of config
files::

    glance-api.conf:
      [DEFAULT]
      bind_port = 9292
      ...

      [rabbit]
      host = localhost
      port = 5672
      use_ssl = False
      userid = guest
      password = guest
      virtual_host = /

Command-line options in a group are automatically prefixed with the
group name::

    --rabbit-host localhost --rabbit-port 9999

Accessing Option Values In Your Code
------------------------------------

Option values in the default group are referenced as attributes/properties on
the config manager; groups are also attributes on the config manager, with
attributes for each of the options associated with the group::

    server.start(app, conf.bind_port, conf.bind_host, conf)

    self.connection = kombu.connection.BrokerConnection(
        hostname=conf.rabbit.host,
        port=conf.rabbit.port,
        ...)

Option Value Interpolation
--------------------------

Option values may reference other values using PEP 292 string substitution::

    opts = [
        cfg.StrOpt('state_path',
                   default=os.path.join(os.path.dirname(__file__), '../'),
                   help='Top-level directory for maintaining nova state.'),
        cfg.StrOpt('sqlite_db',
                   default='nova.sqlite',
                   help='File name for SQLite.'),
        cfg.StrOpt('sql_connection',
                   default='sqlite:///$state_path/$sqlite_db',
                   help='Connection string for SQL database.'),
    ]

.. note::

  Interpolation can be avoided by using `$$`.

.. note::

  You can use `.` to delimit option from other groups, e.g.
  ${mygroup.myoption}.

Special Handling Instructions
-----------------------------

Options may be declared as required so that an error is raised if the user
does not supply a value for the option::

    opts = [
        cfg.StrOpt('service_name', required=True),
        cfg.StrOpt('image_id', required=True),
        ...
    ]

Options may be declared as secret so that their values are not leaked into
log files::

     opts = [
        cfg.StrOpt('s3_store_access_key', secret=True),
        cfg.StrOpt('s3_store_secret_key', secret=True),
        ...
     ]

Dictionary Options
------------------

If you need end users to specify a dictionary of key/value pairs, then you can
use the DictOpt::

    opts = [
        cfg.DictOpt('foo',
                    default={})
    ]

The end users can then specify the option foo in their configuration file
as shown below:

.. code-block:: ini

    [DEFAULT]
    foo = k1:v1,k2:v2


Global ConfigOpts
-----------------

This module also contains a global instance of the ConfigOpts class
in order to support a common usage pattern in OpenStack::

    from oslo_config import cfg

    opts = [
        cfg.StrOpt('bind_host', default='0.0.0.0'),
        cfg.PortOpt('bind_port', default=9292),
    ]

    CONF = cfg.CONF
    CONF.register_opts(opts)

    def start(server, app):
        server.start(app, CONF.bind_port, CONF.bind_host)

Positional Command Line Arguments
---------------------------------

Positional command line arguments are supported via a 'positional' Opt
constructor argument::

    >>> conf = cfg.ConfigOpts()
    >>> conf.register_cli_opt(cfg.MultiStrOpt('bar', positional=True))
    True
    >>> conf(['a', 'b'])
    >>> conf.bar
    ['a', 'b']

Sub-Parsers
-----------

It is also possible to use argparse "sub-parsers" to parse additional
command line arguments using the SubCommandOpt class:

    >>> def add_parsers(subparsers):
    ...     list_action = subparsers.add_parser('list')
    ...     list_action.add_argument('id')
    ...
    >>> conf = cfg.ConfigOpts()
    >>> conf.register_cli_opt(cfg.SubCommandOpt('action', handler=add_parsers))
    True
    >>> conf(args=['list', '10'])
    >>> conf.action.name, conf.action.id
    ('list', '10')

Advanced Option
---------------

Use if you need to label an option as advanced in sample files, indicating the
option is not normally used by the majority of users and might have a
significant effect on stability and/or performance::

    from oslo_config import cfg

    opts = [
        cfg.StrOpt('option1', default='default_value',
                    advanced=True, help='This is help '
                    'text.'),
        cfg.PortOpt('option2', default='default_value',
                     help='This is help text.'),
    ]

    CONF = cfg.CONF
    CONF.register_opts(opts)

This will result in the option being pushed to the bottom of the
namespace and labeled as advanced in the sample files, with a notation
about possible effects::

    [DEFAULT]
    ...
    # This is help text. (string value)
    # option2 = default_value
    ...
    <pushed to bottom of section>
    ...
    # This is help text. (string value)
    # Advanced Option: intended for advanced users and not used
    # by the majority of users, and might have a significant
    # effect on stability and/or performance.
    # option1 = default_value

iÿÿÿÿN(tremovals(tmoves(t_LIt_LW(t	iniparser(ttypestErrorcBs#eZdZdd„Zd„ZRS(sBase class for cfg exceptions.cCs
||_dS(N(tmsg(tselfR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__init__ªscCs|jS(N(R(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__str__­sN(t__name__t
__module__t__doc__tNoneR	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR§stNotInitializedErrorcBseZdZd„ZRS(s(Raised if parser is not initialized yet.cCsdS(Ns.call expression on parser has not been invoked((R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
´s(RRR
R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR±stArgsAlreadyParsedErrorcBseZdZd„ZRS(s0Raised if a CLI opt is registered after parsing.cCs'd}|jr#|d|j7}n|S(Nsarguments already parseds: (R(Rtret((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
»s	(RRR
R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¸stNoSuchOptErrorcBs#eZdZdd„Zd„ZRS(s3Raised if an opt which doesn't exist is referenced.cCs||_||_dS(N(topt_nametgroup(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Ås	cCs2|jdkrdn	|jj}d|j|fS(NtDEFAULTsno such option %s in group [%s](RRtnameR(Rt
group_name((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
És!N(RRR
RR	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÂstNoSuchGroupErrorcBs eZdZd„Zd„ZRS(s4Raised if a group which doesn't exist is referenced.cCs
||_dS(N(R(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ÑscCsd|jS(Nsno such group [%s](R(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
Ôs(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÎs	tDuplicateOptErrorcBs eZdZd„Zd„ZRS(s:Raised if multiple opts with the same name are registered.cCs
||_dS(N(R(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ÛscCsd|jS(Nsduplicate option: %s(R(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
Þs(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRØs	tRequiredOptErrorcBs#eZdZdd„Zd„ZRS(sERaised if an option is required but no value is supplied by the user.cCs||_||_dS(N(RR(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ås	cCs2|jdkrdn	|jj}d|j|fS(NRs*value required for option %s in group [%s](RRRR(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
és!	N(RRR
RR	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRâstTemplateSubstitutionErrorcBseZdZd„ZRS(sBRaised if an error occurs substituting a variable in an opt value.cCsd|jS(Nstemplate substitution error: %s(R(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
òs(RRR
R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRïstConfigFilesNotFoundErrorcBs eZdZd„Zd„ZRS(s1Raised if one or more config files are not found.cCs
||_dS(N(tconfig_files(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ùscCsddj|jƒS(Ns$Failed to find some config files: %st,(tjoinR(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
üs(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRös	t ConfigFilesPermissionDeniedErrorcBs eZdZd„Zd„ZRS(s4Raised if one or more config files are not readable.cCs
||_dS(N(R(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	scCsddj|jƒS(Ns$Failed to open some config files: %sR(RR(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
s(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR s	tConfigDirNotFoundErrorcBs eZdZd„Zd„ZRS(s0Raised if the requested config-dir is not found.cCs
||_dS(N(t
config_dir(RR"((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	scCsd|jS(Ns(Failed to read config file directory: %s(R"(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
s(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR!s	tConfigFileParseErrorcBs eZdZd„Zd„ZRS(s2Raised if there is an error parsing a config file.cCs||_||_dS(N(tconfig_fileR(RR$R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	s	cCsd|j|jfS(NsFailed to parse %s: %s(R$R(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
s(RRR
R	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR#s	tConfigFileValueErrorcBseZdZRS(s:Raised if a config file value does not match its opt type.(RRR
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR%!stDefaultValueErrorcBseZdZRS(s:Raised if a default config type does not fit the opt type.(RRR
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR&&scCstjjtjj|ƒƒS(s3Apply tilde expansion and absolutization to a path.(tostpathtabspatht
expanduser(tp((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_fixpath*scCsn|r%ttjjdd|ƒƒndtdƒ|rLtjjd|ƒnddg}ttjt|ƒƒS(s3Return a list of directories where config files may be located.

    :param project: an optional project name

    If a project is specified, following directories are returned::

      ~/.${project}/
      ~/
      /etc/${project}/
      /etc/

    Otherwise, these directories::

      ~/
      /etc/
    t~t.s/etcN(	R,R'R(RRtlistRtfiltertbool(tprojecttcfg_dirs((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_get_config_dirs/s
(		tcCsJxC|D];}tjj|d||fƒ}tjj|ƒr|SqWdS(s‚Search a list of directories for a given filename.

    Iterator over the supplied directories, returning the first file
    found with the supplied name and extension.

    :param dirs: a list of directories
    :param basename: the filename, for example 'glance-api'
    :param extension: the file extension, for example '.conf'
    :returns: the path to a matching file, or None
    s%s%sN(R'R(Rtexists(tdirstbasenamet	extensiontdR(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_search_dirsJs
s.confcCs§|dkrDtjjtjdƒ}|jdƒrD|d }qDnt|ƒ}g}|rx|jt	|||ƒƒn|jt	|||ƒƒt
tjt
|ƒƒS(s?Return a list of default configuration files.

    :param project: an optional project name
    :param prog: the program name, defaulting to the basename of
        sys.argv[0], without extension .py
    :param extension: the type of the config file

    We default to two config files: [${project}.conf, ${prog}.conf]

    And we look for those config files in the following directories::

      ~/.${project}/
      ~/
      /etc/${project}/
      /etc/

    We return an absolute path for (at most) one of each the default config
    files, for the topmost directory it exists in.

    For example, if project=foo, prog=bar and /etc/foo/foo.conf, /etc/bar.conf
    and ~/.foo/bar.conf all exist, then we return ['/etc/foo/foo.conf',
    '~/.foo/bar.conf']

    If no project name is supplied, we only look for ${prog.conf}.
    is.pyiýÿÿÿN(RR'R(R8tsystargvtendswithR4tappendR;R/RR0R1(R2tprogR9R3R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytfind_config_files[scCsD|j|kr<||jd|kr8t|jƒ‚ntStSdS(síCheck whether an opt with the same name is already registered.

    The same opt may be registered multiple times, with only the first
    registration having any effect. However, it is an error to attempt
    to register a different opt with the same name.

    :param opts: the set of opts already registered
    :param opt: the opt to be registered
    :returns: True if the opt was previously registered, False otherwise
    :raises: DuplicateOptError if a naming conflict is detected
    toptN(tdestRRtTruetFalse(toptsRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_is_opt_registered„s
cKs7x0|D](}|j|kr||j|_qqWdS(N(RCtdefault(RFtkwargsRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytset_defaults˜s
cCs|dkr|S|jƒS(NR(tlower(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_normalize_group_namežstOptcBs×eZdZeZddddeddeeddddeddeed„Zd„Zd„Zd„Z	d„Z
ejZd„Z
dd„Zdedd	„Zd
„Zd„Zd„Zdd
„Zd„ZRS(s‘Base class for all configuration options.

    The only required parameter is the option's name. However, it is
    common to also supply a default and help string for all options.

    :param name: the option's name
    :param type: the option's type. Must be a callable object that takes string
                 and returns converted and validated value
    :param dest: the name of the corresponding :class:`.ConfigOpts` property
    :param short: a single character CLI option name
    :param default: the default value of the option
    :param positional: True if the option is a positional CLI argument
    :param metavar: the option argument to show in --help
    :param help: an explanation of how the option is used
    :param secret: true if the value should be obfuscated in log output
    :param required: true if a value must be supplied for this option
    :param deprecated_name: deprecated name option.  Acts like an alias
    :param deprecated_group: the group containing a deprecated alias
    :param deprecated_opts: list of :class:`.DeprecatedOpt`
    :param sample_default: a default string for sample config files
    :param deprecated_for_removal: indicates whether this opt is planned for
                                   removal in a future release
    :param deprecated_reason: indicates why this opt is planned for removal in
                              a future release. Silently ignored if
                              deprecated_for_removal is False
    :param deprecated_since: indicates which release this opt was deprecated
                             in. Accepts any string, though valid version
                             strings are encouraged. Silently ignored if
                             deprecated_for_removal is False
    :param mutable: True if this option may be reloaded
    :param advanced: a bool True/False value if this option has advanced usage
                             and is not normally used by the majority of users

    An Opt object has no public methods, but has a number of public properties:

    .. py:attribute:: name

        the name of the option, which may include hyphens

    .. py:attribute:: type

        a callable object that takes string and returns converted and
        validated value.  Default types are available from
        :class:`oslo_config.types`

    .. py:attribute:: dest

        the (hyphen-less) :class:`.ConfigOpts` property which contains the
        option value

    .. py:attribute:: short

        a single character CLI option name

    .. py:attribute:: default

        the default value of the option

    .. py:attribute:: sample_default

        a sample default value string to include in sample config files

    .. py:attribute:: positional

        True if the option is a positional CLI argument

    .. py:attribute:: metavar

        the name shown as the argument to a CLI option in --help output

    .. py:attribute:: help

        a string explaining how the option's value is used

    .. py:attribute:: advanced

        in sample files, a bool value indicating the option is advanced

    .. versionchanged:: 1.2
       Added *deprecated_opts* parameter.

    .. versionchanged:: 1.4
       Added *sample_default* parameter.

    .. versionchanged:: 1.9
       Added *deprecated_for_removal* parameter.

    .. versionchanged:: 2.7
       An exception is now raised if the default value has the wrong type.

    .. versionchanged:: 3.2
       Added *deprecated_reason* parameter.

    .. versionchanged:: 3.5
       Added *mutable* parameter.

    .. versionchanged:: 3.12
       Added *deprecated_since* parameter.

    .. versionchanged:: 3.15
       Added *advanced* parameter and attribute.
    cCs™|jdƒr%td|fƒ‚n||_|dkrItjƒ}nt|ƒsdtdƒ‚n||_|dkr”|jj	ddƒ|_
n	||_
||_||_||_
||_||_||_|	|_|
|_||_||_||_t|_|dk	r*|j	ddƒ}ntj|
ƒp<g|_|dk	sZ|dk	ry|jjt|d|ƒƒn|jƒ||_||_dS(Nt_sillegal name %s with prefix _stype must be callablet-R( t
startswitht
ValueErrorRRRtStringtcallablet	TypeErrorttypetreplaceRCtshortRHtsample_defaultt
positionaltmetavarthelptsecrettrequiredtdeprecated_for_removaltdeprecated_reasontdeprecated_sinceREt_logged_deprecationtcopytdeepcopytdeprecated_optsR?t
DeprecatedOptt_check_defaulttmutabletadvanced(RRRURCRWRHRYRZR[R\R]tdeprecated_nametdeprecated_groupRdRXR^R_R`RgRh((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	s@															

	cCsDt|jtjƒr@|jjddƒjddƒ}d|kStS(s/Check if default is a reference to another var.s\$R5s$$t$(t
isinstanceRHtsixtstring_typesRVRE(Rttmpl((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_default_is_ref=s!
cCso|jdk	rk|jƒrky|j|jƒWqktk
rgtdi|jd6|jd6ƒ‚qkXndS(NsCError processing default value %(default)s for Opt type of %(opt)s.RHRB(RHRRpRUt	ExceptionR&(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRfDs


cCst|ƒt|ƒkS(N(tvars(Rtanother((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__ne__OscCst|ƒt|ƒkS(N(Rr(RRs((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__eq__Rsc
Cs||jfg}||jf}xa|jD]V}|j|j}}|sP|r+|j|rb|n||rq|n|jfƒq+q+W|j|d|jd|jd|ƒ}|jrþ|j	rþt
|_	|pÑd}	tjt
dƒi|jd6|	d6ƒn|S(s”Retrieves the option value from a _Namespace object.

        :param namespace: a _Namespace object
        :param group_name: a group name
        tmultiRYtcurrent_nameRswOption "%(option)s" from group "%(group)s" is deprecated for removal.  Its value may be silently ignored in the future.toptionR(RCRRdRR?t
_get_valueRvRYR^RaRDtLOGtwarningR(
Rt	namespaceRtnamesRwRBtdnametdgrouptvaluetpretty_group((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_get_from_namespaceWs  	c		Cs¿|j||ƒ}|j|ƒ}|jd|r9|jndƒ}g}xE|jD]:}|j|j|jƒ}|dk	rR|j|ƒqRqRW|j	|||j|j
|||j|ƒdS(s}Makes the option available in the command line interface.

        This is the method ConfigOpts uses to add the opt to the CLI interface
        as appropriate for the opt type. Some opt types may extend this method,
        others may just extend the helper methods it uses.

        :param parser: the CLI option parser
        :param group: an optional OptGroup object
        R5N(t_get_argparse_containert_get_argparse_kwargst_get_argparse_prefixRRRdt_get_deprecated_cli_nameRR?t_add_to_argparseRWRY(	RtparserRt	containerRItprefixtdeprecated_namesRBRi((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_add_to_clits
!R5c	s…‡fd†}	|	dƒ||g}
|rF|
j|	dƒ|ƒnx%|D]}|
j|	dƒ|ƒqMW|j||
|ŽdS(sÏAdd an option to an argparse parser or group.

        :param container: an argparse._ArgumentGroup object
        :param name: the opt name
        :param short: the short opt name
        :param kwargs: the keyword arguments for add_argument()
        :param prefix: an optional prefix to prepend to the opt name
        :param positional: whether the option is a positional CLI argument
        :param deprecated_names: list of deprecated option names
        csˆs
|SdS(NR5((targ(RY(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pythyphen—ss--RON(R?tadd_parser_argument(RRˆR‰RRWRIRŠRYR‹RŽtargsRi((RYsD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR‡‹s
cCs!|dk	r|j|ƒS|SdS(sßReturns an argparse._ArgumentGroup.

        :param parser: an argparse.ArgumentParser
        :param group: an (optional) OptGroup object
        :returns: an argparse._ArgumentGroup if group is given, else parser
        N(Rt_get_argparse_group(RRˆR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRƒ¢s
cKsu|js?|j}|dk	r2|jd|}n||d<n
d|d<|jidd6|jd6|jd6ƒ|S(	sPBuild a dict of keyword arguments for argparse's add_argument().

        Most opt types extend this method to customize the behaviour of the
        options added to argparse.

        :param group: an optional group
        :param \*\*kwargs: optional keyword arguments to add to
        :returns: a dict of keyword arguments
        RNRCt?tnargsRHRZR[N(RYRCRRtupdateRZR[(RRRIRC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR„®s
		


cCs |dk	r|d|S|SdS(s³Build a prefix for the CLI option name, if required.

        CLI options in a group are prefixed with the group's name in order
        to avoid conflicts between similarly named options in different
        groups.

        :param prefix: an existing prefix to append to (for example 'no' or '')
        :param group_name: an optional group name
        :returns: a CLI option prefix including the group name, if appropriate
        RON(R(RRŠR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR…ÄscCs]|dkrd}n|dkr1|dkr1dS|dkrI|j}n|j||ƒ|S(s&Build a CLi arg name for deprecated options.

        Either a deprecated name or a deprecated group or both or
        neither can be supplied:

          dname, dgroup -> dgroup + '-' + dname
          dname         -> dname
          dgroup        -> dgroup + '-' + self.name
          neither        -> None

        :param dname: a deprecated name, which can be None
        :param dgroup: a deprecated group, which can be None
        :param prefix: an prefix to append to (for example 'no' or '')
        :returns: a CLI argument name
        RN(RRR…(RR~RRŠ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR†Ôs	cCst|ƒt|ƒkS(N(thash(RRs((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__lt__ïsN(RRR
RERvRR	RpRfRtRutobjectt__hash__R‚RŒR‡RƒR„R…R†R–(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRM¤s,h	(									RecBs5eZdZdd„Zd„Zd„Zd„ZRS(s*Represents a Deprecated option.

    Here's how you can use it::

        oldopts = [cfg.DeprecatedOpt('oldopt1', group='group1'),
                   cfg.DeprecatedOpt('oldopt2', group='group2')]
        cfg.CONF.register_group(cfg.OptGroup('group1'))
        cfg.CONF.register_opt(cfg.StrOpt('newopt', deprecated_opts=oldopts),
                              group='group1')

    For options which have a single value (like in the example above),
    if the new option is present ("[group1]/newopt" above), it will override
    any deprecated options present ("[group1]/oldopt1" and "[group2]/oldopt2"
    above).

    If no group is specified for a DeprecatedOpt option (i.e. the group is
    None), lookup will happen within the same group the new option is in.
    For example, if no group was specified for the second option 'oldopt2' in
    oldopts list::

        oldopts = [cfg.DeprecatedOpt('oldopt1', group='group1'),
                   cfg.DeprecatedOpt('oldopt2')]
        cfg.CONF.register_group(cfg.OptGroup('group1'))
        cfg.CONF.register_opt(cfg.StrOpt('newopt', deprecated_opts=oldopts),
                              group='group1')

    then lookup for that option will happen in group 'group1'.

    If the new option is not present and multiple deprecated options are
    present, the option corresponding to the first element of deprecated_opts
    will be chosen.

    Multi-value options will return all new and deprecated
    options. So if we have a multi-value option "[group1]/opt1" whose
    deprecated option is "[group2]/opt2", and the conf file has both these
    options specified like so::

        [group1]
        opt1=val10,val11

        [group2]
        opt2=val21,val22

    Then the value of "[group1]/opt1" will be ['val11', 'val12', 'val21',
    'val22'].

    .. versionadded:: 1.2
    cCs||_||_dS(s‡Constructs an DeprecatedOpt object.

        :param name: the name of the option
        :param group: the group of the option
        N(RR(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	&s	cCs|j|jfS(N(RR(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__key/scCs|jƒ|jƒkS(N(t_DeprecatedOpt__key(Rtother((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRu2scCst|jƒƒS(N(R•Rš(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR˜5sN(RRR
RR	RšRuR˜(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyReós
1			tStrOptcBs&eZdZdddddd„ZRS(s!Option with String type

    Option with ``type`` :class:`oslo_config.types.String`

    :param name: the option's name
    :param choices: Optional sequence of valid values.
    :param quotes: If True and string is enclosed with single or double
                   quotes, will strip those quotes.
    :param regex: Optional regular expression (string or compiled
                  regex) that the value must match on an unanchored
                  search.
    :param ignore_case: If True case differences (uppercase vs. lowercase)
                        between 'choices' or 'regex' will be ignored.
    :param max_length: If positive integer, the value must be less than or
                       equal to this parameter.
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionchanged:: 2.7
       Added *quotes* parameter

    .. versionchanged:: 2.7
       Added *regex* parameter

    .. versionchanged:: 2.7
       Added *ignore_case* parameter

    .. versionchanged:: 2.7
       Added *max_length* parameter
    cKsGtt|ƒj|dtjd|d|d|d|d|ƒ|dS(NRUtchoicestquotestregextignore_caset
max_length(tsuperRœR	RRR(RRRRžRŸR R¡RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Xs	N(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRœ9stBoolOptcBs8eZdZd„Zdd„Zd„Zdd„ZRS(s1Boolean options.

    Bool opts are set to True or False on the command line using --optname or
    --nooptname respectively.

    In config files, boolean values are cast with Boolean type.

    :param name: the option's name
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
    cKsDd|krtdƒ‚ntt|ƒj|dtjƒ|dS(NRYs%positional boolean args not supportedRU(RQR¢R£R	RtBoolean(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	qscCs-tt|ƒj||ƒ|j||ƒdS(s<Extends the base class method to add the --nooptname option.N(R¢R£RŒt_add_inverse_to_argparse(RRˆR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRŒvsc		CsÙ|j||ƒ}|j|ddƒ}|jd|r?|jndƒ}g}xK|jD]@}|j|j|jddƒ}|dk	rX|j|ƒqXqXWd|j|d<|j	|||jd|||j
|ƒdS(s0Add the --nooptname option to the option parser.tactiontstore_falsetnoRŠsThe inverse of --R[N(RƒR„R…RRRdR†RR?R‡RY(	RRˆRR‰RIRŠR‹RBRi((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¥{s!		t
store_truecKsUtt|ƒj||}d|kr1|d=nd|krG|d=n||d<|S(s;Extends the base argparse keyword dict for boolean options.RURZR¦(R¢R£R„(RRR¦RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR„‹s


N(RRR
R	RRŒR¥R„(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR£ds
		tIntOptcBseZdZddd„ZRS(svOption with Integer type

    Option with ``type`` :class:`oslo_config.types.Integer`

    :param name: the option's name
    :param min: minimum value the integer can take
    :param max: maximum value the integer can take
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionchanged:: 1.15

       Added *min* and *max* parameters.
    cKs/tt|ƒj|dtj||ƒ|dS(NRU(R¢RªR	RtInteger(RRtmintmaxRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	­s$N(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRªstFloatOptcBseZdZddd„ZRS(snOption with Float type

    Option with ``type`` :class:`oslo_config.types.Float`
    :param min: minimum value the float can take
    :param max: maximum value the float can take

    :param name: the option's name
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionchanged:: 3.14

       Added *min* and *max* parameters.
    cKs/tt|ƒj|dtj||ƒ|dS(NRU(R¢R®R	RtFloat(RRR¬R­RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Âs$N(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR®²stListOptcBseZdZddd„ZRS(s¥Option with List(String) type

    Option with ``type`` :class:`oslo_config.types.List`

    :param name: the option's name
    :param item_type: type of items (see :class:`oslo_config.types`)
    :param bounds: if True the value should be inside "[" and "]" pair
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionchanged:: 2.5
       Added *item_type* and *bounds* parameters.
    cKs5tt|ƒj|dtjd|d|ƒ|dS(NRUt	item_typetbounds(R¢R°R	RtList(RRR±R²RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ÖsN(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR°Çs
tDictOptcBseZdZd„ZRS(såOption with Dict(String) type

    Option with ``type`` :class:`oslo_config.types.Dict`

    :param name: the option's name
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionadded:: 1.2
    cKs)tt|ƒj|dtjƒ|dS(NRU(R¢R´R	RtDict(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	és(RRR
R	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR´Ýs
tIPOptcBseZdZdd„ZRS(sBOpt with IPAddress type

    Option with ``type`` :class:`oslo_config.types.IPAddress`

    :param name: the option's name
    :param version: one of either ``4``, ``6``, or ``None`` to specify
       either version.
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    .. versionadded:: 1.4
    cKs,tt|ƒj|dtj|ƒ|dS(NRU(R¢R¶R	Rt	IPAddress(RRtversionRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ûs!N(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¶ístPortOptcBs eZdZdddd„ZRS(seOption for a TCP/IP port number.  Ports can range from 0 to 65535.

    Option with ``type`` :class:`oslo_config.types.Integer`

    :param name: the option's name
    :param choices: Optional sequence of valid values.
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`
    :param min: minimum value the port can take
    :param max: maximum value the port can take

    .. versionadded:: 2.6
    .. versionchanged:: 3.2
       Added *choices* parameter.
    .. versionchanged:: 3.4
       Allow port number with 0.
    .. versionchanged:: 3.16
       Added *min* and *max* parameters.
    c	KsGtjd|d|d|ddƒ}tt|ƒj|d||dS(NR¬R­Rt	type_names
port valueRU(RtPortR¢R¹R	(RRR¬R­RRIRU((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	s	N(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¹stHostnameOptcBseZdZd„ZRS(s“Option for a hostname.  Only accepts valid hostnames.

    Option with ``type`` :class:`oslo_config.types.Hostname`

    .. versionadded:: 3.8
    cKs)tt|ƒj|dtjƒ|dS(NRU(R¢R¼R	RtHostname(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	$s(RRR
R	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¼stURIOptcBseZdZdd„ZRS(s)Opt with URI type

    Option with ``type`` :class:`oslo_config.types.URI`

    :param max_length: If positive integer, the value must be less than or
                       equal to this parameter.

    .. versionadded:: 3.12

    .. versionchanged:: 3.14
       Added *max_length* parameter
    cKs/tt|ƒj|dtjd|ƒ|dS(NRUR¡(R¢R¾R	RtURI(RRR¡RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	8sN(RRR
RR	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¾)s
tMultiOptcBs&eZdZeZd„Zd„ZRS(s‡Multi-value option.

    Multi opt values are typed opts which may be specified multiple times.
    The opt value is a list containing all the values specified.

    :param name: the option's name
    :param item_type: Type of items (see :class:`oslo_config.types`)
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt`

    For example::

       cfg.MultiOpt('foo',
                    item_type=types.Integer(),
                    default=None,
                    help="Multiple foo option")

    The command line ``--foo=1 --foo=2`` would result in ``cfg.CONF.foo``
    containing ``[1,2]``

    .. versionadded:: 1.3
    cKs tt|ƒj|||dS(N(R¢RÀR	(RRR±RI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	WscKs<tt|ƒj|ƒ}|js.d|d<n
d|d<|S(s?Extends the base argparse keyword dict for multi value options.R?R¦t*R“(R¢RÀR„RY(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR„Zs
	

(RRR
RDRvR	R„(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÀ>s	tMultiStrOptcBseZdZd„ZRS(sõMultiOpt with a MultiString ``item_type``.

    MultiOpt with a default :class:`oslo_config.types.MultiString` item
    type.

    :param name: the option's name
    :param \*\*kwargs: arbitrary keyword arguments passed to :class:`MultiOpt`
    cKs)tt|ƒj|dtjƒ|dS(NR±(R¢RÂR	RtMultiString(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	os	(RRR
R	(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÂds	t
SubCommandOptcBs2eZdZdddddd„Zdd„ZRS(sSub-command options.

    Sub-command options allow argparse sub-parsers to be used to parse
    additional command line arguments.

    The handler argument to the SubCommandOpt constructor is a callable
    which is supplied an argparse subparsers object. Use this handler
    callable to add sub-parsers.

    The opt value is SubCommandAttr object with the name of the chosen
    sub-parser stored in the 'name' attribute and the values of other
    sub-parser arguments available as additional attributes.

    :param name: the option's name
    :param dest: the name of the corresponding :class:`.ConfigOpts` property
    :param handler: callable which is supplied subparsers object when invoked
    :param title: title of the sub-commands group in help output
    :param description: description of the group in help output
    :param help: a help string giving an overview of available sub-commands
    cCsMtt|ƒj|dtjƒd|d|ƒ||_||_||_dS(s\Construct an sub-command parsing option.

        This behaves similarly to other Opt sub-classes but adds a
        'handler' argument. The handler is a callable which is supplied
        an subparsers object when invoked. The add_parser() method on
        this subparsers object can be used to register parsers for
        sub-commands.
        RURCR[N(R¢RÄR	RRRthandlerttitletdescription(RRRCRÅRÆRÇR[((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Œs

!
		c	Cs‚|j}|dk	r)|jd|}n|jd|d|jd|jd|jƒ}t|_|j	dk	r~|j	|ƒndS(s7Add argparse sub-parsers and invoke the handler method.RNRCRÆRÇR[N(
RCRRtadd_subparsersRÆRÇR[RDR]RÅ(RRˆRRCt
subparsers((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRŒœs				N(RRR
RR	RŒ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÄust_ConfigFileOptcBs9eZdZdejfd„ƒYZd„Zd„ZRS(sÛThe --config-file option.

    This is an private option type which handles the special processing
    required for --config-file options.

    As each --config-file option is encountered on the command line, we
    parse the file and store the parsed values in the _Namespace object.
    This allows us to properly handle the precedence of --config-file
    options over previous command line arguments, but not over subsequent
    arguments.

    .. versionadded:: 1.2
    tConfigFileActioncBseZdZdd„ZRS(s/An argparse action for --config-file.

        As each --config-file option is encountered, this action adds the
        value to the config_file attribute on the _Namespace object but also
        parses the configuration file and stores the values found also in
        the _Namespace object.
        cCsdt||jdƒdkr1t||jgƒnt||jƒ}|j|ƒtj||ƒdS(s{Handle a --config-file command line argument.

            :raises: ConfigFileParseError, ConfigFileValueError
            N(tgetattrRCRtsetattrR?tConfigParsert_parse_file(RRˆR|tvaluest
option_stringtitems((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__call__Ès

N(RRR
RRÓ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR˾scKs#tt|ƒj|d„|dS(NcSs|S(N((tx((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt<lambda>Õs(R¢RÊR	(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	ÔscKs)tt|ƒj|ƒ}|j|d<|S(s?Extends the base argparse keyword dict for the config file opt.R¦(R¢RÊR„RË(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR„×s
(RRR
targparsetActionRËR	R„(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÊ®s	t
_ConfigDirOptcBs9eZdZdejfd„ƒYZd„Zd„ZRS(sêThe --config-dir option.

    This is an private option type which handles the special processing
    required for --config-dir options.

    As each --config-dir option is encountered on the command line, we
    parse the files in that directory and store the parsed values in the
    _Namespace object. This allows us to properly handle the precedence of
    --config-dir options over previous command line arguments, but not
    over subsequent arguments.

    .. versionadded:: 1.2
    tConfigDirActioncBseZdZdd„ZRS(s An argparse action for --config-dir.

        As each --config-dir option is encountered, this action sets the
        config_dir attribute on the _Namespace object but also parses the
        configuration files and stores the values found also in the
        _Namespace object.
        cCsŸ|jj|ƒt||j|ƒtjj|ƒ}tjj|ƒsVt|ƒ‚ntjj	|dƒ}x-t
tj|ƒƒD]}tj
||ƒqWdS(s§Handle a --config-dir command line argument.

            :raises: ConfigFileParseError, ConfigFileValueError,
                     ConfigDirNotFoundError
            s*.confN(t_config_dirsR?RÍRCR'R(R*R6R!RtsortedtglobRÎRÏ(RRˆR|RÐRÑtconfig_dir_globR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÓøsN(RRR
RRÓ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÙîscKs)tt|ƒj|dtjƒ|dS(NRU(R¢RØR	RR³(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	scKs)tt|ƒj|ƒ}|j|d<|S(sAExtends the base argparse keyword dict for the config dir option.R¦(R¢RØR„RÙ(RRRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR„s
(RRR
RÖR×RÙR	R„(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRØÞs	tOptGroupcBsDeZdZddd„Zed„Zd„Zd„Zd„Z	RS(s`Represents a group of opts.

    CLI opts in the group are automatically prefixed with the group name.

    Each group corresponds to a section in config files.

    An OptGroup object has no public methods, but has a number of public string
    properties:

    .. py:attribute:: name

        the name of the group

    .. py:attribute:: title

        the group title as displayed in --help

    .. py:attribute:: help

        the group description as displayed in --help

    :param name: the group name
    :param title: the group title for --help
    :param help: the group description for --help
    cCsG||_|dkrd|n||_||_i|_d|_dS(sConstructs an OptGroup object.s
%s optionsN(RRRÆR[t_optst_argparse_group(RRRÆR[((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	2s
			cCs8t|j|ƒrtSi|d6|d6|j|j<tS(sûAdd an opt to this group.

        :param opt: an Opt object
        :param cli: whether this is a CLI option
        :returns: False if previously registered, True otherwise
        :raises: DuplicateOptError if a naming conflict is detected
        RBtcli(RGRßRERCRD(RRBRá((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
_register_opt;scCs&|j|jkr"|j|j=ndS(sJRemove an opt from this group.

        :param opt: an Opt object
        N(RCRß(RRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_unregister_optJscCs4|jdkr-|j|j|jƒ|_n|jS(N(RàRtadd_argument_groupRÆR[(RRˆ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR‘RscCs
d|_dS(s(Clear this group's option parsing state.N(RRà(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_clearYsN(
RRR
RR	RERâRãR‘Rå(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÞs			t
ParseErrorcBseZd„Zd„ZRS(cCs)tt|ƒj|||ƒ||_dS(N(R¢RæR	tfilename(RRtlinenotlineRç((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	_scCs d|j|j|j|jfS(Nsat %s:%d, %s: %r(RçRèRRé(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
cs(RRR	R
(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRæ^s	RÎcBs_eZdZd„Zd„Zd„Zd„Zd„Zd	d„Z	d„Z
ed„ƒZRS(
sëParses a single config file, populating 'sections' to look like:

        {'DEFAULT': {'key': [value, ...], ...},
         ...}

       Also populates self._normalized which looks the same but with normalized
       section names.
    cCs;tt|ƒjƒ||_||_d|_d|_dS(N(R¢RÎR	RçtsectionsRt_normalizedtsection(RRçRê((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	rs
			cCs
||_dS(N(Rë(Rt
normalized((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_add_normalizedyscCs2t|jƒ}tt|ƒj|ƒSWdQXdS(N(topenRçR¢RÎtparse(Rtf((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRð|scCsQ||_|jj|jiƒ|jdk	rM|jjt|jƒiƒndS(N(RìRêt
setdefaultRëRRL(RRì((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytnew_section€s
	cs{|js|jƒ‚ndjˆƒ‰‡‡fd†}||j|jƒ|jdk	rw||jt|jƒƒndS(Ns
cs-||jˆgƒ||ˆjˆƒdS(N(RòR?(RêRì(tkeyR€(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR?Žs(Rìterror_no_sectionRRêRëRRL(RRôR€R?((RôR€sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
assignmentˆs	cCst||||jƒS(N(RæRç(RRRèRé((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt	parse_exc–scCs|jd|jƒS(Ns)Section must be started before assignment(R÷Rè(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRõ™s	cCsòt|ƒ}i}i}|||ƒ}|j|ƒy|jƒWn‰tjk
rr}t|jt|ƒƒ‚n\tk
rÍ}|j	t	j
kr¤|j|ƒdS|j	t	jkrÇ|j
|ƒdS‚nX|j||ƒ|j||ƒdS(s€Parse a config file and store any values in the namespace.

        :raises: ConfigFileParseError, ConfigFileValueError
        N(R,RîRðRRæR#RçtstrtIOErrorterrnotENOENTt_file_not_foundtEACCESt_file_permission_deniedt_add_parsed_config_filet _parse_cli_opts_from_config_file(tclsR$R|RêRíRˆtpeterr((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRϝs&


N(
RRR
R	RîRðRóRöRR÷RõtclassmethodRÏ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÎhs						R¸s3.4tremoval_versions4.0tMultiConfigParsercBs\eZdZedƒZd„Zd„Zd„Zed„Z	eedd„Zd„ZRS(	sA ConfigParser which handles multi-opts.

    All methods in this class which accept config names should treat a section
    name of None as 'DEFAULT'.

    This class was deprecated in Mitaka and should be removed in Ocata.
    _Namespace holds values, ConfigParser._parse_file reads one file into a
    _Namespace and ConfigOpts._parse_config_files reads multiple files into a
    _Namespace.
    sqOption "%(dep_option)s" from group "%(dep_group)s" is deprecated. Use option "%(option)s" from group "%(group)s".cCs"g|_g|_tƒ|_dS(N(tparsedRëtsett_emitted_deprecations(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Ìs		cCs…g}xx|D]p}i}i}t||ƒ}|j|ƒy|jƒWntk
r_q
nX|j||ƒ|j|ƒq
W|S(N(RÎRîRðRùRÿR?(RRtread_okRçRêRíRˆ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytreadÑs


cCs*|jjd|ƒ|jjd|ƒdS(süAdd a parsed config file to the list of parsed files.

        :param sections: a mapping of section name to dicts of config values
        :param normalized: sections mapping with section names normalized
        :raises: ConfigFileValueError
        iN(RtinsertRë(RRêRí((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÿãscCs|j|d|ƒS(NRv(t_get(RR}Rv((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytgetíscsg}‡fd†}g|D]\}}||ƒ|f^q}x®ˆrR|jn|jD]”}	x‹|D]ƒ\}}||	kr„qfn||	|krf|p¡|d}|j||f||dƒ|	||}
|râ|
|}qé|
SqfqfWqYW|r|gkr|St‚dS(sHFetch a config file value from the parsed files.

        :param names: a list of (section, name) tuples
        :param multi: a boolean indicating whether to return multiple values
        :param normalized: whether to normalize group names to lowercase
        :param current_name: current name in tuple being checked
        cs)|dkrd}nˆr%t|ƒS|S(NR(RRL(R(Rí(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt	normalizeús	iiN(RëRt_check_deprecatedtKeyError(RR}RvRíRwtrvalueRRìRRêtval((RísD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
ðs$+
cCs‹||kr‡||jkr‡|jj|ƒ|dp8d|df}tj|ji|dd6|dd6|dd6|dd6ƒndS(	sSCheck for usage of deprecated names.

        :param name: A tuple of the form (group, name) representing the group
                     and name where an opt value was found.
        :param current: A tuple of the form (group, name) representing the
                        current name for an option.
        :param deprecated: A list of tuples with the same format as the name
                    param which represent any deprecated names for an option.
                    If the name param matches any entries in this list a
                    deprecation warning will be logged.
        iRit
dep_optiont	dep_groupRxRN(R	taddRzR{t_deprecated_opt_message(RRtcurrentt
deprecated((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRsN(
RRR
RRR	RRÿRERRR
R(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR»s			
"t
_NamespacecBsŒeZdZedƒZd„Zd„Zd„Zd„Zd„Z	e
d„Ze
e
dd„Z
d	„Ze
e
ded
„Zd„ZRS(
seAn argparse namespace which also stores config file values.

    As we parse command line arguments, the values get set as attributes
    on a namespace object. However, we also want to parse config files as
    they are specified on the command line and collect the values alongside
    the option values parsed from the command line.

    Note, we don't actually assign values from config files as attributes
    on the namespace because config file options be registered after the
    command line has been parsed, so we may not know how to properly parse
    or convert a config file value at this point.
    sqOption "%(dep_option)s" from group "%(dep_group)s" is deprecated. Use option "%(option)s" from group "%(group)s".cCsF||_g|_g|_tƒ|_g|_g|_g|_dS(N(t_conft_parsedRëRR	t_files_not_foundt_files_permission_deniedRÚ(Rtconf((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	;s					cCsHt|jƒ}|j||ƒx"|jjƒD]\}}|dk	rP|jnd}y|j||ƒ}WnEtk
r‚q/n2tk
r³}t	d|jt
|ƒfƒ‚nX|dkrÌ|j}	n|d|j}	|jr0t
||	dƒdkrt||	gƒnt
||	ƒ}
|
j|ƒq/t||	|ƒq/WdS(sÃParse CLI options from a config file.

        CLI options are special - we require they be registered before the
        command line is parsed. This means that as we parse config files, we
        can go ahead and apply the appropriate option-type specific conversion
        to the values in config files for CLI options. We can't do this for
        non-CLI options, because the schema describing those options may not be
        registered until after the config files are parsed.

        This method relies on that invariant in order to enforce proper
        priority of option values - i.e. that the order in which an option
        value is parsed, whether the value comes from the CLI or a config file,
        determines which value specified for a given option wins.

        The way we implement this ordering is that as we parse each config
        file, we look for values in that config file for CLI options only. Any
        values for CLI options found in the config file are treated like they
        had appeared on the command line and set as attributes on the namespace
        objects. Values in later config files or on the command line will
        override values found in this file.
        s$Value for option %s is not valid: %sRNN(RRRÿt
_all_cli_optsRRR‚RRQR%RøRCRvRÌRÍtextend(RRêRíR|RBRRR€tveRCRÐ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRDs*
	cCs*|jjd|ƒ|jjd|ƒdS(süAdd a parsed config file to the list of parsed files.

        :param sections: a mapping of section name to dicts of config values
        :param normalized: sections mapping with section names normalized
        :raises: ConfigFileValueError
        iN(RRRë(RRêRí((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÿuscCs|jj|ƒdS(ssRecord that we were unable to open a config file.

        :param config_file: the path to the failed file
        N(RR?(RR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRüscCs|jj|ƒdS(szRecord that we have no permission to open a config file.

        :param config_file: the path to the failed file
        N(RR?(RR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRþ†scCsvxi|D]a\}}|dkr%|n|d|}t||dƒ}|dk	r|rd|rdqn|SqWt‚dS(sœFetch a CLI option value.

        Look up the value of a CLI option. The value itself may have come from
        parsing the command line or parsing config files specified on the
        command line. Type conversion have already been performed for CLI
        options at this point.

        :param names: a list of (section, name) tuples
        :param positional: whether this is a positional option
        RNN(RRÌR(RR}RYRRR€((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_get_cli_values 
csg}‡fd†}g|D]\}}||ƒ|f^q}x®ˆrR|jn|jD]”}	x‹|D]ƒ\}}||	kr„qfn||	|krf|p¡|d}|j||f||dƒ|	||}
|râ|
|}qé|
SqfqfWqYW|r|gkr|St‚dS(sHFetch a config file value from the parsed files.

        :param names: a list of (section, name) tuples
        :param multi: a boolean indicating whether to return multiple values
        :param normalized: whether to normalize group names to lowercase
        :param current_name: current name in tuple being checked
        cs)|dkrd}nˆr%t|ƒS|S(NR(RRL(R(Rí(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¯s	iiN(RëRRR(RR}RvRíRwRRRìRRêR((RísD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_get_file_value¤s$	+
cCs‹||kr‡||jkr‡|jj|ƒ|dp8d|df}tj|ji|dd6|dd6|dd6|dd6ƒndS(	sSCheck for usage of deprecated names.

        :param name: A tuple of the form (group, name) representing the group
                     and name where an opt value was found.
        :param current: A tuple of the form (group, name) representing the
                        current name for an option.
        :param deprecated: A list of tuples with the same format as the name
                    param which represent any deprecated names for an option.
                    If the name param matches any entries in this list a
                    deprecation warning will be logged.
        iRiRRRxRN(R	RRzR{R(RRRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÇsc	Cs“y|j||ƒSWnxtk
rŽg|D]*\}}|dk	rI|nd|f^q+}|j|d|d|d|ƒ}|r†|S|dSXdS(sçFetch a value from config files.

        Multiple names for a given configuration option may be supplied so
        that we can transparently handle files containing deprecated option
        names or groups.

        :param names: a list of (section, name) tuples
        :param positional: whether this is a positional option
        :param multi: a boolean indicating whether to return multiple values
        :param normalized: whether to normalize group names to lowercase
        RRvRíRwiÿÿÿÿN(R#RRR$(	RR}RvRYRwRítgtnRÐ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRyÝs

7	ccs.x'|jD]}x|D]}|VqWq
WdS(N(R(RRêRì((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt	_sectionsós
N(RRR
RRR	RRÿRüRþRER#RR$RRDRyR'(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR)s			1	
		"	t_CachedArgumentParsercBsVeZdZddd„Zd„Zd„Zddd„Zdd„Zdd„Z	RS(sZclass for caching/collecting command line arguments.

    It also sorts the arguments before initializing the ArgumentParser.
    We need to do this since ArgumentParser by default does not sort
    the argument options and the only way to influence the order of
    arguments in '--help' is to ensure they are added in the sorted
    order.
    cKs)tt|ƒj|||i|_dS(N(R¢R(R	t_args_cache(RR@tusageRI((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	scOsQg}||jkr%|j|}n|ji|d6|d6ƒ||j|<dS(NRRI(R)R?(RR‰RRIRÐ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRs
cCsxñtj|jƒD]Ý\}}d}t}x;t|ƒD]-\}}|ddjdƒs8t}Pq8q8W|ru|n	t|ƒ}t|| dd„ƒ||*xO|D]G}y|j	|d|dŽWq¥t
jk
rë}t|ƒ‚q¥Xq¥WqWi|_dS(NiRRORôcSs|dS(NR((RÔ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÕsRI(
Rmt	iteritemsR)REt	enumerateRPRDtlenRÛtadd_argumentRÖt
ArgumentErrorR(RR‰RÐtindexthas_positionaltargumenttsizete((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytinitialize_parser_argumentss 

cCs#|jƒtt|ƒj||ƒS(N(R5R¢R(t
parse_args(RRR|((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR6&s
cCs$|jƒtt|ƒj|ƒdS(N(R5R¢R(t
print_help(Rtfile((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR7*s
cCs$|jƒtt|ƒj|ƒdS(N(R5R¢R(tprint_usage(RR8((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR9.s
N(
RRR
RR	RR5R6R7R9(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR(ùs			t
ConfigOptscBsúeZdZdBZd„Zd„Zed„ƒZd	„Zd
„Z	dCdCdCdCdCdCed„Zd„Z
d
„Zd„Zd„Zd„Zd„Ze	d„ƒZd„Ze	dCed„ƒZe	dCd„ƒZe	dCd„ƒZe	dCd„ƒZd„Ze	dCd„ƒZe	dCd„ƒZdCd„Zd„Ze	dCed„ƒZe	dCed„ƒZe	dCd„ƒZ e	dCd „ƒZ!d!„Z"d"„Z#d#„Z$e%d$„ƒZ&d%„Z'd&„Z(dCd'„Z)dCd(„Z*dCdCd)„Z+dCdCd*„Z,dCdCd+„Z-d,e.j/fd-„ƒYZ/d.„Z0ed/„Z1dCd0„Z2dCd1„Z3d2„Z4d3„Z5d4„Z6d5„Z7e	d6„ƒZ8d7„Z9d8„Z:d9„Z;d:„Z<d;„Z=d<e>j?fd=„ƒYZ@d>eAfd?„ƒYZBd@eAfdA„ƒYZCRS(DstConfig options which may be set on the command line or in config files.

    ConfigOpts is a configuration option manager with APIs for registering
    option schemas, grouping options, parsing option values and retrieving
    the values of options.

    It has built-in support for :oslo.config:option:`config_file` and
    :oslo.config:option:`config_dir` options.

    R2R@R¸R*tdefault_config_filescCssi|_i|_d|_d|_d|_d|_tgƒ|_i|_	g|_
tjƒ|_
t|_dS(sConstruct a ConfigOpts object.N(Rßt_groupsRt_argst_oparsert
_namespacet_mutable_nsRt
_mutate_hookst_ConfigOpts__cachet_config_optstcollectionstdequet	_cli_optsREt_validate_default_values(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	Bs								cCsµ|d	krDtjjtjdƒ}|jdƒrD|d }qDn|d	krbt||ƒ}ntd|d|ƒ|_	|d	k	r«|j	j
|j	dddd|ƒn||fS(
s7Initialize a ConfigCliParser object for option parsing.is.pyiýÿÿÿR@R*s	--versionR¦R¸N(RR'R(R8R<R=R>RAR(R>R(RR2R@R¸R*R;((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
_pre_setupRs
cCs4tdd|ddddƒtddddd	ƒgS(
Nsconfig-fileRHRZtPATHR[sŒPath to a config file to use. Multiple config files can be specified, with values in later files taking precedence. Defaults to %(default)s.s
config-dirtDIRs0Path to a config directory to pull *.conf files from. This file set is sorted, so as to provide a predictable parse order if individual options are over-ridden. The set is parsed after the file(s) specified via previous --config-file, arguments hence over-ridden options in the directory take precedence.(RÊRØ(R;((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_make_config_optionsgs		cCsS|j|ƒ|_|j|jƒ||_||_||_||_||_dS(s2Initialize a ConfigOpts object for option parsing.N(RKRCtregister_cli_optsR2R@R¸R*R;(RR2R@R¸R*R;((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_setup}s				cs"tjˆƒ‡fd†ƒ}|S(NcsI|jdtƒr5ˆ|||Ž}|jjƒ|Sˆ|||ŽSdS(Ntclear_cache(tpopRDRBtclear(RRRItresult(Rñ(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__innerŠs

(t	functoolstwraps(Rñt_ConfigOpts__inner((RñsD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
__clear_cache‰s	cCsÈ|jƒ||_|j|||||ƒ\}}|j|||||ƒ|j|dk	re|n
tjdƒ|_|jj	r™t
|jj	ƒ‚n|jjrºt|jjƒ‚n|j
ƒdS(s‰Parse command line arguments and config files.

        Calling a ConfigOpts object causes the supplied command line arguments
        and config files to be parsed, causing opt values to be made available
        as attributes of the object.

        The object may be called multiple times, each time causing the previous
        set of values to be overwritten.

        Automatically registers the --config-file option with either a supplied
        list of default config files, or a list from find_config_files().

        If the --config-dir option is set, any *.conf files from this
        directory are pulled in, after all the file(s) specified by the
        --config-file option.

        :param args: command line arguments (defaults to sys.argv[1:])
        :param project: the toplevel project name, used to locate config files
        :param prog: the name of the program (defaults to sys.argv[0]
            basename, without extension .py)
        :param version: the program version (for --version)
        :param usage: a usage string (%prog will be expanded)
        :param default_config_files: config files to use by default
        :param validate_default_values: whether to validate the default values
        :raises: SystemExit, ConfigFilesNotFoundError, ConfigFileParseError,
                 ConfigFilesPermissionDeniedError,
                 RequiredOptError, DuplicateOptError
        iN(RPRGRHRMt_parse_cli_optsRR<R=R?RRRR t_check_required_opts(RRR2R@R¸R*R;tvalidate_default_values((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRӕs $
		cCsHy|j|ƒSWn0tk
r'‚ntk
rCt|ƒ‚nXdS(süLook up an option value and perform string substitution.

        :param name: the opt name (or 'dest', more precisely)
        :returns: the option value (after string substitution) or a GroupAttr
        :raises: ValueError or NoSuchOptError
        N(R
RQRqR(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__getattr__Ïs

cCs
|j|ƒS(s8Look up an option value and perform string substitution.(RZ(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__getitem__ÝscCs||jkp||jkS(s<Return True if key is the name of a registered opt or group.(RßR<(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__contains__ásccs8x1tj|jjƒ|jjƒƒD]}|Vq%WdS(s0Iterate over all registered opt and group names.N(t	itertoolstchainRßtkeysR<(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__iter__ås+cCst|jƒt|jƒS(s/Return the number of options and option groups.(R-RßR<(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt__len__êscCs|jƒ|jƒdS(s8Clear the object state and unset overrides and defaults.N(t_unset_defaults_and_overridesRP(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytresetîs
cCsed|_d|_d|_d|_t|_|j|jƒx!|j	j
ƒD]}|jƒqMWdS(sºClear the state of the object to before it was called.

        Any subparsers added using the add_cli_subparsers() will also be
        removed as a side-effect of this method.
        N(RR=R>R?R@RERGtunregister_optsRCR<RÐRå(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRPós					cCsmi|d6|d6|jkr!dS|jrK|jji|d6|d6ƒn|jji|d6|d6ƒdS(NRBR(RFRYR?t
appendleft(RRBR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_add_cli_opt	s
	!cCsÒ|dk	rJ|j|dtƒ}|r:|j||ƒn|j||ƒS|dkr|j|jkrtd|jƒ‚qn|rš|j|dƒnt|j	|ƒr°t
Si|d6|d6|j	|j<tS(sýRegister an option schema.

        Registering an option schema makes any option value which is previously
        or subsequently parsed from the command line or config files available
        as an attribute of this object.

        :param opt: an instance of an Opt sub-class
        :param group: an optional OptGroup object or group name
        :param cli: whether this is a CLI option
        :return: False if the opt was already registered, True otherwise
        :raises: DuplicateOptError
        t
autocreates%Name %s was reserved for oslo.config.RBRáN(Rt
_get_groupRDRfRâRtdisallow_namesRQRGRßRERC(RRBRRá((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytregister_opt	scCs+x$|D]}|j||dtƒqWdS(s)Register multiple option schemas at once.RNN(RjRE(RRFRRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
register_opts2	s
cCs:|jdk	rtdƒ‚n|j||dtdtƒS(s÷Register a CLI option schema.

        CLI option schemas must be registered before the command line and
        config files are parsed. This is to ensure that all CLI options are
        shown in --help and option validation works as expected.

        :param opt: an instance of an Opt sub-class
        :param group: an optional OptGroup object or group name
        :return: False if the opt was already registered, True otherwise
        :raises: DuplicateOptError, ArgsAlreadyParsedError
        scannot register CLI optionRáRNN(R=RRRjRDRE(RRBR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytregister_cli_opt8	s
cCs+x$|D]}|j||dtƒqWdS(s-Register multiple CLI option schemas at once.RNN(RlRE(RRFRRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRLJ	s
cCs3|j|jkrdStj|ƒ|j|j<dS(s±Register an option group.

        An option group must be registered before options can be registered
        with the group.

        :param group: an OptGroup object
        N(RR<Rb(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytregister_groupP	scCsí|jdk	rtdƒ‚nd}x\|jD]Q}|dj|jkr.|dksu|j|ƒj|djkr.|}Pq.q.W|dk	r¢|jj|ƒn|dk	rÇ|j|ƒj|ƒn"|j|j	kré|j	|j=ndS(s»Unregister an option.

        :param opt: an Opt object
        :param group: an optional OptGroup object or group name
        :raises: ArgsAlreadyParsedError, NoSuchGroupError
        s"reset before unregistering optionsRBRN(
R=RRRFRCRhRtremoveRãRß(RRBRtremitemtitem((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytunregister_opt]	scCs+x$|D]}|j||dtƒqWdS(s/Unregister multiple CLI option schemas at once.RNN(RqRE(RRFRRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRdw	s
cCst|ƒ|j||ƒdS(sƒImport an option definition from a module.

        Import a module and check that a given option is registered.

        This is intended for use with global configuration objects
        like cfg.CONF where modules commonly register options with
        CONF at module load time. If one module requires an option
        defined by another module it can use this method to explicitly
        declare the dependency.

        :param name: the name/dest of the opt
        :param module_str: the name of a module to import
        :param group: an option OptGroup object or group name
        :raises: NoSuchOptError, NoSuchGroupError
        N(t
__import__t
_get_opt_info(RRt
module_strR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
import_opt}	s
cCst|ƒ|j|ƒdS(sYImport an option group from a module.

        Import a module and check that a given option group is registered.

        This is intended for use with global configuration objects
        like cfg.CONF where modules commonly register options with
        CONF at module load time. If one module requires an option group
        defined by another module it can use this method to explicitly
        declare the dependency.

        :param group: an option OptGroup object or group name
        :param module_str: the name of a module to import
        :raises: ImportError, NoSuchGroupError
        N(RrRh(RRRt((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytimport_group	s
cCsO|j||ƒ}|rA|dk	rA|j||dƒ|d<n
||d<dS(sóOverride an opt value.

        Override the command line, config file and default values of a
        given option.

        :param name: the name/dest of the opt
        :param override: the override value
        :param group: an option OptGroup object or group name
        :param enforce_type: a boolean whether to convert the override
         value to the option's type, None is *not* converted even
         if enforce_type is True.
        :raises: NoSuchOptError, NoSuchGroupError
        RBtoverrideN(RsRt_convert_value(RRRwRtenforce_typetopt_info((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytset_override¢	s
	cCsO|j||ƒ}|rA|dk	rA|j||dƒ|d<n
||d<dS(s+Override an opt's default value.

        Override the default value of given option. A command line or
        config file value will still take precedence over this default.

        :param name: the name/dest of the opt
        :param default: the default value
        :param group: an option OptGroup object or group name
        :param enforce_type: a boolean whether to convert the default
         value to the option's type, None is *not* converted even
         if enforce_type is True.
        :raises: NoSuchOptError, NoSuchGroupError
        RBRHN(RsRRx(RRRHRRyRz((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytset_default¸	s
	cCs&|j||ƒ}|jddƒdS(s?Clear an override an opt value.

        Clear a previously set override of the command line, config file
        and default values of a given option.

        :param name: the name/dest of the opt
        :param group: an option OptGroup object or group name
        :raises: NoSuchOptError, NoSuchGroupError
        RwN(RsROR(RRRRz((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytclear_overrideÎ	scCs&|j||ƒ}|jddƒdS(s Clear an override an opt's default value.

        Clear a previously set override of the default value of given option.

        :param name: the name/dest of the opt
        :param group: an option OptGroup object or group name
        :raises: NoSuchOptError, NoSuchGroupError
        RHN(RsROR(RRRRz((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt
clear_defaultÜ	s
ccshx"|jjƒD]}|dfVqWx<|jjƒD]+}x"|jjƒD]}||fVqKWq5WdS(s-A generator function for iteration opt infos.N(RßRÐRR<(RtinfoR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_all_opt_infosé	s
ccs+x$|jD]}|d|dfVq
WdS(s,A generator function for iterating CLI opts.RBRN(RF(RRp((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR ñ	scCsAx:|jƒD],\}}|jddƒ|jddƒq
WdS(s-Unset any default or override on all options.RHRwN(R€ROR(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRbö	scCs|jdkrgS|jjS(N(R?RRÚ(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytconfig_dirsü	scCs°|jstƒ‚ng}|jjrTx*|jjD]}|jt|ƒƒq4Wnx6t|jƒD]%}|jtjj	t|ƒƒƒqdW|j
t|jƒƒt
||ƒS(sîLocate a file located alongside the config files.

        Search for a file with the supplied basename in the directories
        which we have already loaded config files from and other known
        configuration directories.

        The directory, if any, supplied by the config_dir option is
        searched first. Then the config_file option is iterated over
        and each of the base directories of the config_files values
        are searched. Failing both of these, the standard directories
        searched by the module level find_config_files() function is
        used. The first matching file is returned.

        :param name: the filename, for example 'policy.json'
        :returns: the path to a matching file, or None
        (R?RRÚR?R,treversedR$R'R(tdirnameR!R4R2R;(RRR7t	directorytcf((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt	find_file
s	#c
Cs‡|j|ddƒ|j|dƒ|j|d|jƒ|j|dt|dƒr^|jpagƒ|j|ddƒd„}xRt|jƒD]A}|j|ƒd	}|j|d
|||t||ƒƒƒq’Wx•|jD]Š}|j	||j
|ƒƒ}xft|j|jƒD]N}|j||ƒd	}|j|d
d||f||t||ƒƒƒqWqáW|j|ddƒdS(
s•Log the value of all registered opts.

        It's often useful for an app to log its configuration to a log file at
        startup for debugging. This method dumps to the entire config state to
        the supplied logger at a given log level.

        :param logger: a logging.Logger object
        :param lvl: the log level (for example logging.DEBUG) arg to
                    logger.log()
        RÁiPs$Configuration options gathered from:scommand line args: %ssconfig files: %sR$t=cSs|js
|SdS(s,Obfuscate values of options declared secret.RÁis****(R\(RBR€((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt	_sanitize3
sRBs
%-30s = %ss%s.%sN(tlogR=thasattrR$RÛRßRsRÌR<t	GroupAttrRh(RtloggertlvlRˆRRBRt
group_attr((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytlog_opt_values!
s&	
!cCs)|jstƒ‚n|jj|ƒdS(stPrint the usage message for the current program.

        This method is for use after all CLI options are known
        registered using __call__() method. If this method is called
        before the __call__() is invoked, it throws NotInitializedError

        :param file: the File object (if None, output is on sys.stdout)
        :raises: NotInitializedError
        N(R>RR9(RR8((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR9F
s
	cCs)|jstƒ‚n|jj|ƒdS(ssPrint the help message for the current program.

        This method is for use after all CLI options are known
        registered using __call__() method. If this method is called
        before the __call__() is invoked, it throws NotInitializedError

        :param file: the File object (if None, output is on sys.stdout)
        :raises: NotInitializedError
        N(R>RR7(RR8((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR7T
s
	cCs…t|tƒr!|j|f}n||f}|dkr_y|j|SWq_tk
r[q_Xn|j|||ƒ}||j|<|S(N(RlRÞRRRBRt_do_get(RRRR|RôR€((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR
b
s

c	sˆdkr4|ˆjkr4ˆjˆˆj|ƒƒSˆj|ˆƒ}|d‰tˆtƒruˆjˆˆˆjƒSd|kr’ˆj	|dƒS‡‡‡‡fd†}ˆj
rˈdkrˈj‰nˆdkrãˆj‰nˆdk	rfˆrþˆj
nd}y|ˆjˆ|ƒƒSWqftk
r1qftk
rb}tdˆj
t|ƒfƒ‚qfXnd|krƒˆj	|dƒSˆjrçˆjdk	rçy|ˆjƒWqätk
rà}tdˆj
t|ƒfƒ‚qäXqçnˆjdk	r|ˆjƒSdS(s|Look up an option value.

        :param name: the opt name (or 'dest', more precisely)
        :param group: an OptGroup
        :param namespace: the namespace object to get the option value from
        :returns: the option value, or a GroupAttr object
        :raises: NoSuchOptError, NoSuchGroupError, ConfigFileValueError,
                 TemplateSubstitutionError
        RBRwcsˆjˆj|ˆˆƒˆƒS(N(Rxt_substitute(R€(RR|RBR(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytconvert†
ss$Value for option %s is not valid: %sRHs,Default value for option %s is not valid: %sN(RR<R‹RhRsRlRÄtSubCommandAttrRCR‘RgR@R?RR‚RRQR%RøRGRH(	RRRR|RR’RR"R4((RR|RBRsD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRp
sH


 	#
csÙt|tƒr;g|D]!}ˆj|dˆdˆƒ^qSt|tƒr¢d|krk|jddƒ}nˆj|ƒ}|jˆjˆdˆdˆƒƒ}|St|tƒrч‡‡fd†|j	ƒDƒS|SdS(sÎPerform string template substitution.

        Substitute any template variables (for example $foo, ${bar}) in
        the supplied string value(s) with opt values.

        :param value: the string value, or list of string values
        :param group: the group that retrieves the option value from
        :param namespace: the namespace object that retrieves the option
                          value from
        :returns: the substituted string(s)
        RR|s\$s$$c	sIi|]?\}}ˆj|dˆdˆƒˆj|dˆdˆƒ“qS(RR|(R‘(t.0RôR(RR|R(sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pys
<dictcomp>Å
s	N(
RlR/R‘RøRVtTemplatetsafe_substitutet
StrSubWrappertdictRÒ(RR€RR|tiRoR((RR|RsD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR‘ª
s)R•cBseZdZRS(s[_a-z][\._a-z0-9]*(RRt	idpattern(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR•Ë
scCs:|jr)g|D]}|j|ƒ^qS|j|ƒSdS(sePerform value type conversion.

        Converts values using option's type. Handles cases when value is
        actually a list of values (for example for multi opts).

        :param value: the string value, or list of string values
        :param opt: option definition (instance of Opt class or its subclasses)
        :returns: converted value
        N(RvRU(RR€RBtv((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRxÎ
s
	 cCs~t|tƒr|nd}|r*|jn|}||jkrs|sTt|ƒ‚n|j|pltd|ƒƒn|j|S(sýLooks up a OptGroup object.

        Helper function to return an OptGroup given a parameter which can
        either be the group's name or an OptGroup object.

        The OptGroup object returned is from the internal dict of OptGroup
        objects, which will be a copy of any OptGroup object that users of
        the API have access to.

        If autocreate is True, the group will be created if it's not found. If
        group is an instance of OptGroup, that same instance will be
        registered, otherwise a new instance of OptGroup will be created.

        :param group_or_name: the group's name or the OptGroup object itself
        :param autocreate: whether to auto-create the group if it's not found
        :raises: NoSuchGroupError
        RN(RlRÞRRR<RRm(Rt
group_or_nameRgRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRhÝ
scCsV|dkr|j}n|j|ƒ}|j}||krNt||ƒ‚n||S(sÚReturn the (opt, override, default) dict for an opt.

        :param opt_name: an opt name/dest
        :param group: an optional group name or OptGroup object
        :raises: NoSuchOptError, NoSuchGroupError
        N(RRßRhR(RRRRF((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRsú
s	cCsˆx|jƒD]s\}}|d}|jr
d|ks
d|krJq
n|j|j||ƒdkr€t|j|ƒ‚q€q
q
WdS(s¸Check that all opts marked as required have values specified.

        :param namespace: the namespace object be checked the required options
        :raises: RequiredOptError
        RBRHRwN(R€R]R
RCRRR(RR|RRRB((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRXs
	cCsC||_x-|jƒD]\}}|j|j|ƒqW|jƒS(swParse command line options.

        Initializes the command line option parser and parses the supplied
        command line arguments.

        :param args: the command line arguments
        :returns: a _Namespace object containing the parsed option values
        :raises: SystemExit, DuplicateOptError
                 ConfigFileParseError, ConfigFileValueError

        (R=R RŒR>t_parse_config_files(RRRBR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRWs	cCsŠt|ƒ}xT|jD]%}|dks7|jdƒrPqqWx!|jD]}tj||ƒqIW|jj|j|ƒ|j|ƒ|S(sÝParse configure files options.

        :raises: SystemExit, ConfigFilesNotFoundError, ConfigFileParseError,
                 ConfigFilesPermissionDeniedError,
                 RequiredOptError, DuplicateOptError
        s
--config-files--config-file=(	RR=RPR;RÎRÏR>R6t_validate_cli_options(RR|RR$((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR.s
cCsäxÝt|jƒdd„ƒD]À\}}|r7|jnd}y|j||ƒ}Wntk
riqnX|j|d|d|ƒ}y|j||ƒWqtk
rÛt	j
jd|jt
|jƒ|fƒt‚qXqWdS(NRôcSs|djS(Ni(R(RÔ((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRÕEsRR|s$argument --%s: Invalid %s value: %s
(RÛR RRR‚RR‘RxRQR<tstderrtwriteRCtreprRUt
SystemExit(RR|RBRRR€((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRžCs

cCsS|jƒ}|jr't|jƒ‚n|jrBt|jƒ‚n|j|ƒ|S(N(RRRRR RX(RR|((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt_reload_config_filesUs		
cCszy|jƒ}WnVtk
r?}tjtdƒ|jƒtStk
rh}tjtdƒ|ƒtSX||_t	SdS(sReload configure files and parse all options

        :return False if reload configure files failed or else return True
        sDCaught SystemExit while reloading configure files with exit code: %ds1Caught Error while reloading configure files:  %sN(
R£R¢RzR{RtcodeRERR?RD(RR|texcR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytreload_config_files_s
	cCs|jj|ƒdS(sîRegisters a hook to be called by mutate_config_files.

        :param hook: a function accepting this ConfigOpts object and a dict of
                     config mutations, as returned by mutate_config_files.
        :return None
        N(RAR(Rthook((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytregister_mutate_hooktsc
Csú|jjƒ|jp|j}|jƒ|_|jƒ|j||jƒ}d„}t|jƒd|ƒ}xd|D]\\\}}\}}|r™|nd}t	j
tdƒi|d6|d6|d6|d6ƒquWx|jD]}	|	||ƒqßW|S(	suReload configure files and parse all options.

        Only options marked as 'mutable' will appear to change.

        Hooks are called in a NON-DETERMINISTIC ORDER. Do not expect hooks to
        be called in the same order as they were added.

        :return {(None or 'group', 'optname'): (old_value, new_value), ... }
        :raises Error if reloading fails
        cSs(|d\}}|r|dSd|fS(Nis	((Rpt	groupnametoptname((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytkey_fnsRôRsGOption %(group)s.%(option)s changed from [%(old_val)s] to [%(new_val)s]RRxtold_valtnew_val(
RBRPR@R?R£t_warn_immutabilityt_diff_nsRÛRÒRzRRRA(
Rt
old_mutate_nstfreshR«tsorted_freshR©RªtoldtnewR§((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytmutate_config_files}s"

	
cCsëxä|jƒD]Ö\}}|d}|jr2q
n|rA|jnd}y|j|j|ƒ}Wntk
ryd}nXy|j|j|ƒ}Wntk
r¬d}nX||kr
tj	t
dƒi|d6|jd6ƒq
q
WdS(sÏCheck immutable opts have not changed.

        _do_get won't return the new values but presumably someone changed the
        config file expecting them to change so we should warn them they won't.
        RBRs8Ignoring change to immutable option %(group)s.%(option)sRRxN(R€RgRR‚R?RRR@RzR{R(RRRRBR©R³R´((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR®¡s 
	



c
CsÝi}xÐ|jƒD]Â\}}|d}|js8qn|rG|jnd}y|j||ƒ}Wntk
r|d}nXy|j||ƒ}	Wntk
r¬d}	nX||	kr||	f|||jf<qqW|S(sÜCompare mutable option values between two namespaces.

        This can be used to only reconfigure stateful sessions when necessary.

        :return {(None or 'group', 'optname'): (old_value, new_value), ... }
        RBN(R€RgRRR‚R(
Rtold_nstnew_nstdiffRRRBR©R³R´((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR¯¹s"
	



 cCs`tgƒ}|jr1|t|jjƒƒO}n|jrV|t|jjƒƒO}nt|ƒS(s´List all sections from the configuration.

        Returns a sorted list of all section names found in the
        configuration files, whether declared beforehand or not.
        (RR@R'R?RÛ(Rts((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pytlist_all_sectionsÒs		R‹cBsDeZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sdHelper class.

        Represents the option values of a group as a mapping and attributes.
        cCs||_||_dS(s…Construct a GroupAttr object.

            :param conf: a ConfigOpts object
            :param group: an OptGroup object
            N(Rt_group(RRR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	æs	cCs|jj||jƒS(s:Look up an option value and perform template substitution.(RR
R»(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRZïscCs
|j|ƒS(s8Look up an option value and perform string substitution.(RZ(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR[óscCs||jjkS(s<Return True if key is the name of a registered opt or group.(R»Rß(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR\÷sccs&x|jjjƒD]}|VqWdS(s0Iterate over all registered opt and group names.N(R»RßR_(RRô((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR`ûscCst|jjƒS(s/Return the number of options and option groups.(R-R»Rß(R((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRas(	RRR
R	RZR[R\R`Ra(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR‹ßs						R“cBs eZdZd„Zd„ZRS(s\Helper class.

        Represents the name and arguments of an argparse sub-parser.
        cCs||_||_||_dS(s¾Construct a SubCommandAttr object.

            :param conf: a ConfigOpts object
            :param group: an OptGroup object
            :param dest: the name of the sub-parser
            N(RR»t_dest(RRRRC((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	s		cCs§|dkrN|j}|jdk	r;|jjd|}nt|jj|ƒS||jkrlt|ƒ‚nyt|jj|ƒSWntk
r¢t	|ƒ‚nXdS(s,Look up a sub-parser name or argument value.RRNN(
R¼R»RRRÌRR?RtAttributeErrorR(RR((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyRZs	
(RRR
R	RZ(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR“s	R—cBs&eZdZddd„Zd„ZRS(sUHelper class.

        Exposes opt values as a dict for string substitution.
        cCs||_||_||_dS(sÿConstruct a StrSubWrapper object.

            :param conf: a ConfigOpts object
            :param group: an OptGroup object
            :param namespace: the namespace object that retrieves the option
                              value from
            N(RRR|(RRRR|((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR	-s		cCsÎy|jddƒ\}}Wn tk
r>|j}|}nXtd|ƒ}y%|jj|d|d|jƒ}Wn,tk
r¡|jj|d|jƒ}nXt||jj	ƒrÊt
d|ƒ‚n|S(s…Look up an opt value from the ConfigOpts object.

            :param key: an opt name
            :returns: an opt value
            R.iRRR|s#substituting group %s not supported(tsplitRQRRÞRR
R|RRlR‹R(RRôRRxRR€((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR[9s
	

N(RRR
RR	R[(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR—&s(sprojectsprogsversionsusagesdefault_config_filesN(DRRR
RiR	RHtstaticmethodRKRMt_ConfigOpts__clear_cacheRRERÓRZR[R\R`RaRcRPRfRjRkRlRLRmRqRdRuRvR{R|R}R~R€R RbtpropertyRR†RR9R7R
RR‘tstringR•RxRhRsRXRWRRžR£R¦R¨RµR®R¯RºRDtMappingR‹R—R“R—(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyR:3s–				
3							%	
	
					%:!					
			$			
%"(RR
RÖRDRbRúRSRÜR]tloggingR'RÂR<t
debtcollectorRRmRtoslo_config._i18nRRtoslo_configRRt	getLoggerRRzRqRRRR½RRRRRRR R!R#RQR%R&R,RR4R;RARGRJRLttotal_orderingR—RMReRœR£RªR®R°R´R¶R¹R¼R¾RÀRÂRÄRÊRØRÞRæt
BaseParserRÎRnRt	NamespaceRtArgumentParserR(RÃR:tCONF(((sD/home/tvault/.virtenv/lib/python2.7/site-packages/oslo_config/cfg.pyt<module>ŽsŽ





	)				ÿOF+9&908H
SmÐ:ÿÿÿÿ"