Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 5047a1e0e29e64fb17f37a6d2f4dead3 > files > 108

openstack-keystone-doc-2012.2.4-5.fc18.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>common Package &mdash; keystone 2012.1-dev documentation</title>
    
    <link rel="stylesheet" href="_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/tweaks.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '2012.1-dev',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/jquery.tweet.js"></script>
    <link rel="top" title="keystone 2012.1-dev documentation" href="index.html" />
    <link rel="up" title="openstack Package" href="keystone.openstack.html" />
    <link rel="next" title="policy Package" href="keystone.policy.html" />
    <link rel="prev" title="openstack Package" href="keystone.openstack.html" /> 
  </head>
  <body>
  <div id="header">
    <h1 id="logo"><a href="http://www.openstack.org/">OpenStack</a></h1>
    <ul id="navigation">
      <li><a href="http://www.openstack.org/" title="Go to the Home page" class="link">Home</a></li>
      <li><a href="http://www.openstack.org/projects/" title="Go to the OpenStack Projects page">Projects</a></li>
      <li><a href="http://www.openstack.org/user-stories/" title="Go to the User Stories page" class="link">User Stories</a></li>
      <li><a href="http://www.openstack.org/community/" title="Go to the Community page" class="link">Community</a></li>
      <li><a href="http://www.openstack.org/blog/" title="Go to the OpenStack Blog">Blog</a></li>
      <li><a href="http://wiki.openstack.org/" title="Go to the OpenStack Wiki">Wiki</a></li>
      <li><a href="http://docs.openstack.org/" title="Go to OpenStack Documentation" class="current">Documentation</a></li>
    </ul>
  </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="common-package">
<h1>common Package<a class="headerlink" href="#common-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-keystone.openstack.common.cfg">
<span id="cfg-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">cfg</span></tt> Module<a class="headerlink" href="#module-keystone.openstack.common.cfg" title="Permalink to this headline">¶</a></h2>
<p>Configuration options which may be set on the command line or in config files.</p>
<p>The schema for each option is defined using the Opt sub-classes, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">common_opts</span> <span class="o">=</span> <span class="p">[</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">StrOpt</span><span class="p">(</span><span class="s">&#39;bind_host&#39;</span><span class="p">,</span>
               <span class="n">default</span><span class="o">=</span><span class="s">&#39;0.0.0.0&#39;</span><span class="p">,</span>
               <span class="n">help</span><span class="o">=</span><span class="s">&#39;IP address to listen on&#39;</span><span class="p">),</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">IntOpt</span><span class="p">(</span><span class="s">&#39;bind_port&#39;</span><span class="p">,</span>
               <span class="n">default</span><span class="o">=</span><span class="mi">9292</span><span class="p">,</span>
               <span class="n">help</span><span class="o">=</span><span class="s">&#39;Port number to listen on&#39;</span><span class="p">)</span>
<span class="p">]</span>
</pre></div>
</div>
<p>Options can be strings, integers, floats, booleans, lists or &#8216;multi strings&#8217;:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">enabled_apis_opt</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">ListOpt</span><span class="p">(</span><span class="s">&#39;enabled_apis&#39;</span><span class="p">,</span>
                               <span class="n">default</span><span class="o">=</span><span class="p">[</span><span class="s">&#39;ec2&#39;</span><span class="p">,</span> <span class="s">&#39;osapi_compute&#39;</span><span class="p">],</span>
                               <span class="n">help</span><span class="o">=</span><span class="s">&#39;List of APIs to enable by default&#39;</span><span class="p">)</span>

<span class="n">DEFAULT_EXTENSIONS</span> <span class="o">=</span> <span class="p">[</span>
    <span class="s">&#39;nova.api.openstack.compute.contrib.standard_extensions&#39;</span>
<span class="p">]</span>
<span class="n">osapi_compute_extension_opt</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">MultiStrOpt</span><span class="p">(</span><span class="s">&#39;osapi_compute_extension&#39;</span><span class="p">,</span>
                                              <span class="n">default</span><span class="o">=</span><span class="n">DEFAULT_EXTENSIONS</span><span class="p">)</span>
</pre></div>
</div>
<p>Option schemas are registered with the config manager at runtime, but before
the option is referenced:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">ExtensionManager</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>

    <span class="n">enabled_apis_opt</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">ListOpt</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">conf</span> <span class="o">=</span> <span class="n">conf</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">conf</span><span class="o">.</span><span class="n">register_opt</span><span class="p">(</span><span class="n">enabled_apis_opt</span><span class="p">)</span>
        <span class="o">...</span>

    <span class="k">def</span> <span class="nf">_load_extensions</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">for</span> <span class="n">ext_factory</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">conf</span><span class="o">.</span><span class="n">osapi_compute_extension</span><span class="p">:</span>
            <span class="o">....</span>
</pre></div>
</div>
<p>A common usage pattern is for each option schema to be defined in the module or
class which uses the option:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">opts</span> <span class="o">=</span> <span class="o">...</span>

<span class="k">def</span> <span class="nf">add_common_opts</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
    <span class="n">conf</span><span class="o">.</span><span class="n">register_opts</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">get_bind_host</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
    <span class="k">return</span> <span class="n">conf</span><span class="o">.</span><span class="n">bind_host</span>

<span class="k">def</span> <span class="nf">get_bind_port</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
    <span class="k">return</span> <span class="n">conf</span><span class="o">.</span><span class="n">bind_port</span>
</pre></div>
</div>
<p>An option may optionally be made available via the command line. Such options
must registered with the config manager before the command line is parsed (for
the purposes of &#8211;help and CLI arg validation):</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">cli_opts</span> <span class="o">=</span> <span class="p">[</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">BoolOpt</span><span class="p">(</span><span class="s">&#39;verbose&#39;</span><span class="p">,</span>
                <span class="n">short</span><span class="o">=</span><span class="s">&#39;v&#39;</span><span class="p">,</span>
                <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
                <span class="n">help</span><span class="o">=</span><span class="s">&#39;Print more verbose output&#39;</span><span class="p">),</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">BoolOpt</span><span class="p">(</span><span class="s">&#39;debug&#39;</span><span class="p">,</span>
                <span class="n">short</span><span class="o">=</span><span class="s">&#39;d&#39;</span><span class="p">,</span>
                <span class="n">default</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span>
                <span class="n">help</span><span class="o">=</span><span class="s">&#39;Print debugging output&#39;</span><span class="p">),</span>
<span class="p">]</span>

<span class="k">def</span> <span class="nf">add_common_opts</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
    <span class="n">conf</span><span class="o">.</span><span class="n">register_cli_opts</span><span class="p">(</span><span class="n">cli_opts</span><span class="p">)</span>
</pre></div>
</div>
<p>The config manager has two CLI options defined by default, &#8211;config-file
and &#8211;config-dir:</p>
<div class="highlight-python"><pre>class ConfigOpts(object):

    def __call__(self, ...):

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

        self.register_cli_opts(opts)</pre>
</div>
<p>Option values are parsed from any supplied config files using
openstack.common.iniparser. If none are specified, a default set is used
e.g. glance-api.conf and glance-common.conf:</p>
<div class="highlight-python"><pre>glance-api.conf:
  [DEFAULT]
  bind_port = 9292

glance-common.conf:
  [DEFAULT]
  bind_host = 0.0.0.0</pre>
</div>
<p>Option values in config files override those on the command line. Config files
are parsed in order, with values in later files overriding those in earlier
files.</p>
<p>The parsing of CLI args and config files is initiated by invoking the config
manager e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">conf</span> <span class="o">=</span> <span class="n">ConfigOpts</span><span class="p">()</span>
<span class="n">conf</span><span class="o">.</span><span class="n">register_opt</span><span class="p">(</span><span class="n">BoolOpt</span><span class="p">(</span><span class="s">&#39;verbose&#39;</span><span class="p">,</span> <span class="o">...</span><span class="p">))</span>
<span class="n">conf</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">:])</span>
<span class="k">if</span> <span class="n">conf</span><span class="o">.</span><span class="n">verbose</span><span class="p">:</span>
    <span class="o">...</span>
</pre></div>
</div>
<p>Options can be registered as belonging to a group:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">rabbit_group</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">OptGroup</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;rabbit&#39;</span><span class="p">,</span>
                            <span class="n">title</span><span class="o">=</span><span class="s">&#39;RabbitMQ options&#39;</span><span class="p">)</span>

<span class="n">rabbit_host_opt</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">StrOpt</span><span class="p">(</span><span class="s">&#39;host&#39;</span><span class="p">,</span>
                             <span class="n">default</span><span class="o">=</span><span class="s">&#39;localhost&#39;</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;IP/hostname to listen on&#39;</span><span class="p">),</span>
<span class="n">rabbit_port_opt</span> <span class="o">=</span> <span class="n">cfg</span><span class="o">.</span><span class="n">IntOpt</span><span class="p">(</span><span class="s">&#39;port&#39;</span><span class="p">,</span>
                             <span class="n">default</span><span class="o">=</span><span class="mi">5672</span><span class="p">,</span>
                             <span class="n">help</span><span class="o">=</span><span class="s">&#39;Port number to listen on&#39;</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">register_rabbit_opts</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
    <span class="n">conf</span><span class="o">.</span><span class="n">register_group</span><span class="p">(</span><span class="n">rabbit_group</span><span class="p">)</span>
    <span class="c"># options can be registered under a group in either of these ways:</span>
    <span class="n">conf</span><span class="o">.</span><span class="n">register_opt</span><span class="p">(</span><span class="n">rabbit_host_opt</span><span class="p">,</span> <span class="n">group</span><span class="o">=</span><span class="n">rabbit_group</span><span class="p">)</span>
    <span class="n">conf</span><span class="o">.</span><span class="n">register_opt</span><span class="p">(</span><span class="n">rabbit_port_opt</span><span class="p">,</span> <span class="n">group</span><span class="o">=</span><span class="s">&#39;rabbit&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>If it no group attributes are required other than the group name, the group
need not be explicitly registered e.g.</p>
<blockquote>
<div><dl class="docutils">
<dt>def register_rabbit_opts(conf):</dt>
<dd># The group will automatically be created, equivalent calling::
#   conf.register_group(OptGroup(name=&#8217;rabbit&#8217;))
conf.register_opt(rabbit_port_opt, group=&#8217;rabbit&#8217;)</dd>
</dl>
</div></blockquote>
<p>If no group is specified, options belong to the &#8216;DEFAULT&#8217; section of config
files:</p>
<div class="highlight-python"><pre>glance-api.conf:
  [DEFAULT]
  bind_port = 9292
  ...

  [rabbit]
  host = localhost
  port = 5672
  use_ssl = False
  userid = guest
  password = guest
  virtual_host = /</pre>
</div>
<p>Command-line options in a group are automatically prefixed with the
group name:</p>
<div class="highlight-python"><pre>--rabbit-host localhost --rabbit-port 9999</pre>
</div>
<p>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:</p>
<div class="highlight-python"><pre>server.start(app, conf.bind_port, conf.bind_host, conf)

self.connection = kombu.connection.BrokerConnection(
    hostname=conf.rabbit.host,
    port=conf.rabbit.port,
    ...)</pre>
</div>
<p>Option values may reference other values using PEP 292 string substitution:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">opts</span> <span class="o">=</span> <span class="p">[</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">StrOpt</span><span class="p">(</span><span class="s">&#39;state_path&#39;</span><span class="p">,</span>
               <span class="n">default</span><span class="o">=</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">__file__</span><span class="p">),</span> <span class="s">&#39;../&#39;</span><span class="p">),</span>
               <span class="n">help</span><span class="o">=</span><span class="s">&#39;Top-level directory for maintaining nova state&#39;</span><span class="p">),</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">StrOpt</span><span class="p">(</span><span class="s">&#39;sqlite_db&#39;</span><span class="p">,</span>
               <span class="n">default</span><span class="o">=</span><span class="s">&#39;nova.sqlite&#39;</span><span class="p">,</span>
               <span class="n">help</span><span class="o">=</span><span class="s">&#39;file name for sqlite&#39;</span><span class="p">),</span>
    <span class="n">cfg</span><span class="o">.</span><span class="n">StrOpt</span><span class="p">(</span><span class="s">&#39;sql_connection&#39;</span><span class="p">,</span>
               <span class="n">default</span><span class="o">=</span><span class="s">&#39;sqlite:///$state_path/$sqlite_db&#39;</span><span class="p">,</span>
               <span class="n">help</span><span class="o">=</span><span class="s">&#39;connection string for sql database&#39;</span><span class="p">),</span>
<span class="p">]</span>
</pre></div>
</div>
<p>Note that interpolation can be avoided by using &#8216;$$&#8217;.</p>
<p>For command line utilities that dispatch to other command line utilities, the
disable_interspersed_args() method is available. If this this method is called,
then parsing e.g.:</p>
<div class="highlight-python"><pre>script --verbose cmd --debug /tmp/mything</pre>
</div>
<p>will no longer return:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="s">&#39;cmd&#39;</span><span class="p">,</span> <span class="s">&#39;/tmp/mything&#39;</span><span class="p">]</span>
</pre></div>
</div>
<p>as the leftover arguments, but will instead return:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="s">&#39;cmd&#39;</span><span class="p">,</span> <span class="s">&#39;--debug&#39;</span><span class="p">,</span> <span class="s">&#39;/tmp/mything&#39;</span><span class="p">]</span>
</pre></div>
</div>
<p>i.e. argument parsing is stopped at the first non-option argument.</p>
<p>Options may be declared as required so that an error is raised if the user
does not supply a value for the option.</p>
<p>Options may be declared as secret so that their values are not leaked into
log files:</p>
<blockquote>
<div><dl class="docutils">
<dt>opts = [</dt>
<dd>cfg.StrOpt(&#8216;s3_store_access_key&#8217;, secret=True),
cfg.StrOpt(&#8216;s3_store_secret_key&#8217;, secret=True),
...</dd>
</dl>
<p>]</p>
</div></blockquote>
<p>This module also contains a global instance of the CommonConfigOpts class
in order to support a common usage pattern in OpenStack:</p>
<blockquote>
<div><p>from openstack.common import cfg</p>
<dl class="docutils">
<dt>opts = [</dt>
<dd>cfg.StrOpt(&#8216;bind_host&#8217; default=&#8216;0.0.0.0&#8217;),
cfg.IntOpt(&#8216;bind_port&#8217;, default=9292),</dd>
</dl>
<p>]</p>
<p>CONF = cfg.CONF
CONF.register_opts(opts)</p>
<dl class="docutils">
<dt>def start(server, app):</dt>
<dd>server.start(app, CONF.bind_port, CONF.bind_host)</dd>
</dl>
</div></blockquote>
<dl class="exception">
<dt id="keystone.openstack.common.cfg.ArgsAlreadyParsedError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ArgsAlreadyParsedError</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ArgsAlreadyParsedError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if a CLI opt is registered after parsing.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.BoolOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">BoolOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.BoolOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>Bool opts are set to True or False on the command line using &#8211;optname or
&#8211;noopttname respectively.</p>
<p>In config files, boolean values are case insensitive and can be set using
1/0, yes/no, true/false or on/off.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.CommonConfigOpts">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">CommonConfigOpts</tt><a class="headerlink" href="#keystone.openstack.common.cfg.CommonConfigOpts" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.ConfigOpts" title="keystone.openstack.common.cfg.ConfigOpts"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.ConfigOpts</span></tt></a></p>
<dl class="attribute">
<dt id="keystone.openstack.common.cfg.CommonConfigOpts.DEFAULT_LOG_DATE_FORMAT">
<tt class="descname">DEFAULT_LOG_DATE_FORMAT</tt><em class="property"> = '%Y-%m-%d %H:%M:%S'</em><a class="headerlink" href="#keystone.openstack.common.cfg.CommonConfigOpts.DEFAULT_LOG_DATE_FORMAT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="keystone.openstack.common.cfg.CommonConfigOpts.DEFAULT_LOG_FORMAT">
<tt class="descname">DEFAULT_LOG_FORMAT</tt><em class="property"> = '%(asctime)s %(levelname)8s [%(name)s] %(message)s'</em><a class="headerlink" href="#keystone.openstack.common.cfg.CommonConfigOpts.DEFAULT_LOG_FORMAT" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="keystone.openstack.common.cfg.CommonConfigOpts.common_cli_opts">
<tt class="descname">common_cli_opts</tt><em class="property"> = [&lt;keystone.openstack.common.cfg.BoolOpt object at 0xa7c6c8c&gt;, &lt;keystone.openstack.common.cfg.BoolOpt object at 0xa7c6cec&gt;]</em><a class="headerlink" href="#keystone.openstack.common.cfg.CommonConfigOpts.common_cli_opts" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="keystone.openstack.common.cfg.CommonConfigOpts.logging_cli_opts">
<tt class="descname">logging_cli_opts</tt><em class="property"> = [&lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6ccc&gt;, &lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6bec&gt;, &lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6eec&gt;, &lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6f2c&gt;, &lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6f6c&gt;, &lt;keystone.openstack.common.cfg.BoolOpt object at 0xa7c6fac&gt;, &lt;keystone.openstack.common.cfg.StrOpt object at 0xa7c6fec&gt;]</em><a class="headerlink" href="#keystone.openstack.common.cfg.CommonConfigOpts.logging_cli_opts" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.ConfigFileParseError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ConfigFileParseError</tt><big>(</big><em>config_file</em>, <em>msg</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigFileParseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if there is an error parsing a config file.</p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.ConfigFileValueError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ConfigFileValueError</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigFileValueError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if a config file value does not match its opt type.</p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.ConfigFilesNotFoundError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ConfigFilesNotFoundError</tt><big>(</big><em>config_files</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigFilesNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if one or more config files are not found.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.ConfigOpts">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ConfigOpts</tt><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">_abcoll.Mapping</span></tt></p>
<p>Config options which may be set on the command line or in config files.</p>
<p>ConfigOpts is a configuration option manager with APIs for registering
option schemas, grouping options, parsing option values and retrieving
the values of options.</p>
<dl class="class">
<dt id="keystone.openstack.common.cfg.ConfigOpts.GroupAttr">
<em class="property">class </em><tt class="descname">GroupAttr</tt><big>(</big><em>conf</em>, <em>group</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.GroupAttr" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">_abcoll.Mapping</span></tt></p>
<p>A helper class representing the option values of a group as a mapping
and attributes.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.ConfigOpts.StrSubWrapper">
<em class="property">class </em><tt class="descclassname">ConfigOpts.</tt><tt class="descname">StrSubWrapper</tt><big>(</big><em>conf</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.StrSubWrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>A helper class exposing opt values as a dict for string substitution.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.clear">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">clear</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.clear" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear the state of the object to before it was called.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.clear_default">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">clear_default</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.clear_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear an override an opt&#8217;s default value.</p>
<p>Clear a previously set override of the default value of given option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name/dest of the opt</li>
<li><strong>group</strong> &#8211; an option OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoSuchOptError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.clear_override">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">clear_override</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.clear_override" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear an override an opt value.</p>
<p>Clear a previously set override of the command line, config file
and default values of a given option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name/dest of the opt</li>
<li><strong>group</strong> &#8211; an option OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoSuchOptError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.disable_interspersed_args">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">disable_interspersed_args</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.disable_interspersed_args" title="Permalink to this definition">¶</a></dt>
<dd><p>Set parsing to stop on the first non-option.</p>
<p>If this this method is called, then parsing e.g.</p>
<blockquote>
<div>script &#8211;verbose cmd &#8211;debug /tmp/mything</div></blockquote>
<p>will no longer return:</p>
<blockquote>
<div>[&#8216;cmd&#8217;, &#8216;/tmp/mything&#8217;]</div></blockquote>
<p>as the leftover arguments, but will instead return:</p>
<blockquote>
<div>[&#8216;cmd&#8217;, &#8216;&#8211;debug&#8217;, &#8216;/tmp/mything&#8217;]</div></blockquote>
<p>i.e. argument parsing is stopped at the first non-option argument.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.enable_interspersed_args">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">enable_interspersed_args</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.enable_interspersed_args" title="Permalink to this definition">¶</a></dt>
<dd><p>Set parsing to not stop on the first non-option.</p>
<p>This it the default behaviour.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.find_file">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">find_file</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.find_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Locate a file located alongside the config files.</p>
<p>Search for a file with the supplied basename in the directories
which we have already loaded config files from and other known
configuration directories.</p>
<p>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.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>basename</strong> &#8211; the filename, e.g. &#8216;policy.json&#8217;</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the path to a matching file, or None</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.import_opt">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">import_opt</tt><big>(</big><em>name</em>, <em>module_str</em>, <em>group=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.import_opt" title="Permalink to this definition">¶</a></dt>
<dd><p>Import an option definition from a module.</p>
<p>Import a module and check that a given option is registered.</p>
<p>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.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name/dest of the opt</li>
<li><strong>module_str</strong> &#8211; the name of a module to import</li>
<li><strong>group</strong> &#8211; an option OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoSuchOptError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.log_opt_values">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">log_opt_values</tt><big>(</big><em>logger</em>, <em>lvl</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.log_opt_values" title="Permalink to this definition">¶</a></dt>
<dd><p>Log the value of all registered opts.</p>
<p>It&#8217;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.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>logger</strong> &#8211; a logging.Logger object</li>
<li><strong>lvl</strong> &#8211; the log level (e.g. logging.DEBUG) arg to logger.log()</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.print_help">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">print_help</tt><big>(</big><em>file=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.print_help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print the help message for the current program.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.print_usage">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">print_usage</tt><big>(</big><em>file=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.print_usage" title="Permalink to this definition">¶</a></dt>
<dd><p>Print the usage message for the current program.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.register_cli_opt">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">register_cli_opt</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.register_cli_opt" title="Permalink to this definition">¶</a></dt>
<dd><p>Register a CLI option schema.</p>
<p>CLI option schemas must be registered before the command line and
config files are parsed. This is to ensure that all CLI options are
show in &#8211;help and option validation works as expected.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>opt</strong> &#8211; an instance of an Opt sub-class</li>
<li><strong>group</strong> &#8211; an optional OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">False if the opt was already register, True otherwise</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">DuplicateOptError, ArgsAlreadyParsedError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.register_cli_opts">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">register_cli_opts</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.register_cli_opts" title="Permalink to this definition">¶</a></dt>
<dd><p>Register multiple CLI option schemas at once.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.register_group">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">register_group</tt><big>(</big><em>group</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.register_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Register an option group.</p>
<p>An option group must be registered before options can be registered
with the group.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>group</strong> &#8211; an OptGroup object</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.register_opt">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">register_opt</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.register_opt" title="Permalink to this definition">¶</a></dt>
<dd><p>Register an option schema.</p>
<p>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.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>opt</strong> &#8211; an instance of an Opt sub-class</li>
<li><strong>group</strong> &#8211; an optional OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">False if the opt was already register, True otherwise</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">DuplicateOptError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.register_opts">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">register_opts</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.register_opts" title="Permalink to this definition">¶</a></dt>
<dd><p>Register multiple option schemas at once.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.reset">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">reset</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.reset" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear the object state and unset overrides and defaults.</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.set_default">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">set_default</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.set_default" title="Permalink to this definition">¶</a></dt>
<dd><p>Override an opt&#8217;s default value.</p>
<p>Override the default value of given option. A command line or
config file value will still take precedence over this default.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name/dest of the opt</li>
<li><strong>default</strong> &#8211; the default value</li>
<li><strong>group</strong> &#8211; an option OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoSuchOptError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.set_override">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">set_override</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.set_override" title="Permalink to this definition">¶</a></dt>
<dd><p>Override an opt value.</p>
<p>Override the command line, config file and default values of a
given option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name/dest of the opt</li>
<li><strong>override</strong> &#8211; the override value</li>
<li><strong>group</strong> &#8211; an option OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">NoSuchOptError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.unregister_opt">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">unregister_opt</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.unregister_opt" title="Permalink to this definition">¶</a></dt>
<dd><p>Unregister an option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>opt</strong> &#8211; an Opt object</li>
<li><strong>group</strong> &#8211; an optional OptGroup object or group name</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first last">ArgsAlreadyParsedError, NoSuchGroupError</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigOpts.unregister_opts">
<tt class="descclassname">ConfigOpts.</tt><tt class="descname">unregister_opts</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigOpts.unregister_opts" title="Permalink to this definition">¶</a></dt>
<dd><p>Unregister multiple CLI option schemas at once.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.ConfigParser">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ConfigParser</tt><big>(</big><em>filename</em>, <em>sections</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.iniparser.BaseParser" title="keystone.openstack.common.iniparser.BaseParser"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.iniparser.BaseParser</span></tt></a></p>
<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigParser.assignment">
<tt class="descname">assignment</tt><big>(</big><em>key</em>, <em>value</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser.assignment" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigParser.error_no_section">
<tt class="descname">error_no_section</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser.error_no_section" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigParser.new_section">
<tt class="descname">new_section</tt><big>(</big><em>section</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser.new_section" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigParser.parse">
<tt class="descname">parse</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser.parse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.ConfigParser.parse_exc">
<tt class="descname">parse_exc</tt><big>(</big><em>msg</em>, <em>lineno</em>, <em>line=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ConfigParser.parse_exc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.DuplicateOptError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">DuplicateOptError</tt><big>(</big><em>opt_name</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.DuplicateOptError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if multiple opts with the same name are registered.</p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.Error">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">Error</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.Error" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Base class for cfg exceptions.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.FloatOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">FloatOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.FloatOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>Float opt values are converted to floats using the float() builtin.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.IntOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">IntOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.IntOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>Int opt values are converted to integers using the int() builtin.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.ListOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ListOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ListOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>List opt values are simple string values separated by commas. The opt value
is a list containing these strings.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.MultiConfigParser">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">MultiConfigParser</tt><a class="headerlink" href="#keystone.openstack.common.cfg.MultiConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<dl class="method">
<dt id="keystone.openstack.common.cfg.MultiConfigParser.get">
<tt class="descname">get</tt><big>(</big><em>section</em>, <em>names</em>, <em>multi=False</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.MultiConfigParser.get" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.cfg.MultiConfigParser.read">
<tt class="descname">read</tt><big>(</big><em>config_files</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.MultiConfigParser.read" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.MultiStrOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">MultiStrOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.MultiStrOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>Multistr opt values are string opts which may be specified multiple times.
The opt value is a list containing all the string values specified.</p>
<dl class="attribute">
<dt id="keystone.openstack.common.cfg.MultiStrOpt.multi">
<tt class="descname">multi</tt><em class="property"> = True</em><a class="headerlink" href="#keystone.openstack.common.cfg.MultiStrOpt.multi" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.NoSuchGroupError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">NoSuchGroupError</tt><big>(</big><em>group_name</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.NoSuchGroupError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if a group which doesn&#8217;t exist is referenced.</p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.NoSuchOptError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">NoSuchOptError</tt><big>(</big><em>opt_name</em>, <em>group=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.NoSuchOptError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a>, <tt class="xref py py-class docutils literal"><span class="pre">exceptions.AttributeError</span></tt></p>
<p>Raised if an opt which doesn&#8217;t exist is referenced.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.Opt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">Opt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.Opt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Base class for all configuration options.</p>
<p>An Opt object has no public methods, but has a number of public string
properties:</p>
<blockquote>
<div><dl class="docutils">
<dt>name:</dt>
<dd>the name of the option, which may include hyphens</dd>
<dt>dest:</dt>
<dd>the (hyphen-less) ConfigOpts property which contains the option value</dd>
<dt>short:</dt>
<dd>a single character CLI option name</dd>
<dt>default:</dt>
<dd>the default value of the option</dd>
<dt>metavar:</dt>
<dd>the name shown as the argument to a CLI option in &#8211;help output</dd>
<dt>help:</dt>
<dd>an string explaining how the options value is used</dd>
</dl>
</div></blockquote>
<dl class="attribute">
<dt id="keystone.openstack.common.cfg.Opt.multi">
<tt class="descname">multi</tt><em class="property"> = False</em><a class="headerlink" href="#keystone.openstack.common.cfg.Opt.multi" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.OptGroup">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">OptGroup</tt><big>(</big><em>name</em>, <em>title=None</em>, <em>help=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.OptGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Represents a group of opts.</p>
<p>CLI opts in the group are automatically prefixed with the group name.</p>
<p>Each group corresponds to a section in config files.</p>
<p>An OptGroup object has no public methods, but has a number of public string
properties:</p>
<blockquote>
<div><dl class="docutils">
<dt>name:</dt>
<dd>the name of the group</dd>
<dt>title:</dt>
<dd>the group title as displayed in &#8211;help</dd>
<dt>help:</dt>
<dd>the group description as displayed in &#8211;help</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.ParseError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">ParseError</tt><big>(</big><em>msg</em>, <em>lineno</em>, <em>line</em>, <em>filename</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.ParseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.iniparser.ParseError" title="keystone.openstack.common.iniparser.ParseError"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.iniparser.ParseError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.RequiredOptError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">RequiredOptError</tt><big>(</big><em>opt_name</em>, <em>group=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.RequiredOptError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if an option is required but no value is supplied by the user.</p>
</dd></dl>

<dl class="class">
<dt id="keystone.openstack.common.cfg.StrOpt">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">StrOpt</tt><big>(</big><em>name</em>, <em>dest=None</em>, <em>short=None</em>, <em>default=None</em>, <em>metavar=None</em>, <em>help=None</em>, <em>secret=False</em>, <em>required=False</em>, <em>deprecated_name=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.StrOpt" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Opt" title="keystone.openstack.common.cfg.Opt"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Opt</span></tt></a></p>
<p>String opts do not have their values transformed and are returned as
str objects.</p>
</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.cfg.TemplateSubstitutionError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">TemplateSubstitutionError</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.TemplateSubstitutionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#keystone.openstack.common.cfg.Error" title="keystone.openstack.common.cfg.Error"><tt class="xref py py-class docutils literal"><span class="pre">keystone.openstack.common.cfg.Error</span></tt></a></p>
<p>Raised if an error occurs substituting a variable in an opt value.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.cfg.find_config_files">
<tt class="descclassname">keystone.openstack.common.cfg.</tt><tt class="descname">find_config_files</tt><big>(</big><em>project=None</em>, <em>prog=None</em>, <em>extension='.conf'</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.cfg.find_config_files" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of default configuration files.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>project</strong> &#8211; an optional project name</li>
<li><strong>prog</strong> &#8211; the program name, defaulting to the basename of sys.argv[0]</li>
<li><strong>extension</strong> &#8211; the type of the config file</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>We default to two config files: [${project}.conf, ${prog}.conf]</p>
<p>And we look for those config files in the following directories:</p>
<div class="highlight-python"><pre>~/.${project}/
~/
/etc/${project}/
/etc/</pre>
</div>
<p>We return an absolute path for (at most) one of each the default config
files, for the topmost directory it exists in.</p>
<p>For example, if project=foo, prog=bar and /etc/foo/foo.conf, /etc/bar.conf
and ~/.foo/bar.conf all exist, then we return [&#8216;/etc/foo/foo.conf&#8217;,
&#8216;~/.foo/bar.conf&#8217;]</p>
<p>If no project name is supplied, we only look for ${prog.conf}.</p>
</dd></dl>

</div>
<div class="section" id="module-keystone.openstack.common.importutils">
<span id="importutils-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">importutils</span></tt> Module<a class="headerlink" href="#module-keystone.openstack.common.importutils" title="Permalink to this headline">¶</a></h2>
<p>Import related utilities and helper functions.</p>
<dl class="function">
<dt id="keystone.openstack.common.importutils.import_class">
<tt class="descclassname">keystone.openstack.common.importutils.</tt><tt class="descname">import_class</tt><big>(</big><em>import_str</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.importutils.import_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a class from a string including module and class</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.importutils.import_module">
<tt class="descclassname">keystone.openstack.common.importutils.</tt><tt class="descname">import_module</tt><big>(</big><em>import_str</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.importutils.import_module" title="Permalink to this definition">¶</a></dt>
<dd><p>Import a module.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.importutils.import_object">
<tt class="descclassname">keystone.openstack.common.importutils.</tt><tt class="descname">import_object</tt><big>(</big><em>import_str</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.importutils.import_object" title="Permalink to this definition">¶</a></dt>
<dd><p>Import a class and return an instance of it.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.importutils.import_object_ns">
<tt class="descclassname">keystone.openstack.common.importutils.</tt><tt class="descname">import_object_ns</tt><big>(</big><em>name_space</em>, <em>import_str</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.importutils.import_object_ns" title="Permalink to this definition">¶</a></dt>
<dd><p>Import a class and return an instance of it, first by trying
to find the class in a default namespace, then failing back to
a full path if not found in the default namespace.</p>
</dd></dl>

</div>
<div class="section" id="module-keystone.openstack.common.iniparser">
<span id="iniparser-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">iniparser</span></tt> Module<a class="headerlink" href="#module-keystone.openstack.common.iniparser" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="keystone.openstack.common.iniparser.BaseParser">
<em class="property">class </em><tt class="descclassname">keystone.openstack.common.iniparser.</tt><tt class="descname">BaseParser</tt><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.assignment">
<tt class="descname">assignment</tt><big>(</big><em>key</em>, <em>value</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.assignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when a full assignment is parsed</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.comment">
<tt class="descname">comment</tt><big>(</big><em>comment</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.comment" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when a comment is parsed</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.error_empty_key">
<tt class="descname">error_empty_key</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.error_empty_key" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.error_invalid_assignment">
<tt class="descname">error_invalid_assignment</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.error_invalid_assignment" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.error_no_section_end_bracket">
<tt class="descname">error_no_section_end_bracket</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.error_no_section_end_bracket" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.error_no_section_name">
<tt class="descname">error_no_section_name</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.error_no_section_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.error_unexpected_continuation">
<tt class="descname">error_unexpected_continuation</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.error_unexpected_continuation" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="keystone.openstack.common.iniparser.BaseParser.lineno">
<tt class="descname">lineno</tt><em class="property"> = 0</em><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.lineno" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.new_section">
<tt class="descname">new_section</tt><big>(</big><em>section</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.new_section" title="Permalink to this definition">¶</a></dt>
<dd><p>Called when a new section is started</p>
</dd></dl>

<dl class="method">
<dt id="keystone.openstack.common.iniparser.BaseParser.parse">
<tt class="descname">parse</tt><big>(</big><em>lineiter</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.parse" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="keystone.openstack.common.iniparser.BaseParser.parse_exc">
<tt class="descname">parse_exc</tt><a class="headerlink" href="#keystone.openstack.common.iniparser.BaseParser.parse_exc" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <a class="reference internal" href="#keystone.openstack.common.iniparser.ParseError" title="keystone.openstack.common.iniparser.ParseError"><tt class="xref py py-class docutils literal"><span class="pre">ParseError</span></tt></a></p>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="keystone.openstack.common.iniparser.ParseError">
<em class="property">exception </em><tt class="descclassname">keystone.openstack.common.iniparser.</tt><tt class="descname">ParseError</tt><big>(</big><em>message</em>, <em>lineno</em>, <em>line</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.iniparser.ParseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
</dd></dl>

</div>
<div class="section" id="jsonutils-module">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">jsonutils</span></tt> Module<a class="headerlink" href="#jsonutils-module" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-keystone.openstack.common.setup">
<span id="setup-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">setup</span></tt> Module<a class="headerlink" href="#module-keystone.openstack.common.setup" title="Permalink to this headline">¶</a></h2>
<p>Utilities with minimum-depends for use in setup.py</p>
<dl class="function">
<dt id="keystone.openstack.common.setup.canonicalize_emails">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">canonicalize_emails</tt><big>(</big><em>changelog</em>, <em>mapping</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.canonicalize_emails" title="Permalink to this definition">¶</a></dt>
<dd><p>Takes in a string and an email alias mapping and replaces all
instances of the aliases in the string with their real email.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.generate_authors">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">generate_authors</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.generate_authors" title="Permalink to this definition">¶</a></dt>
<dd><p>Create AUTHORS file using git commits.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.get_cmdclass">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">get_cmdclass</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.get_cmdclass" title="Permalink to this definition">¶</a></dt>
<dd><p>Return dict of commands to run from setup.py.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.get_reqs_from_files">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">get_reqs_from_files</tt><big>(</big><em>requirements_files</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.get_reqs_from_files" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.parse_dependency_links">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">parse_dependency_links</tt><big>(</big><em>requirements_files=['requirements.txt', 'tools/pip-requires']</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.parse_dependency_links" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.parse_mailmap">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">parse_mailmap</tt><big>(</big><em>mailmap='.mailmap'</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.parse_mailmap" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.parse_requirements">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">parse_requirements</tt><big>(</big><em>requirements_files=['requirements.txt', 'tools/pip-requires']</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.parse_requirements" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.write_git_changelog">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">write_git_changelog</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.write_git_changelog" title="Permalink to this definition">¶</a></dt>
<dd><p>Write a changelog based on the git changelog.</p>
</dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.write_requirements">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">write_requirements</tt><big>(</big><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.write_requirements" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="keystone.openstack.common.setup.write_vcsversion">
<tt class="descclassname">keystone.openstack.common.setup.</tt><tt class="descname">write_vcsversion</tt><big>(</big><em>location</em><big>)</big><a class="headerlink" href="#keystone.openstack.common.setup.write_vcsversion" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce a vcsversion dict that mimics the old one produced by bzr.</p>
</dd></dl>

</div>
<div class="section" id="timeutils-module">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">timeutils</span></tt> Module<a class="headerlink" href="#timeutils-module" title="Permalink to this headline">¶</a></h2>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference internal" href="#">common Package</a><ul>
<li><a class="reference internal" href="#module-keystone.openstack.common.cfg"><tt class="docutils literal"><span class="pre">cfg</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-keystone.openstack.common.importutils"><tt class="docutils literal"><span class="pre">importutils</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-keystone.openstack.common.iniparser"><tt class="docutils literal"><span class="pre">iniparser</span></tt> Module</a></li>
<li><a class="reference internal" href="#jsonutils-module"><tt class="docutils literal"><span class="pre">jsonutils</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-keystone.openstack.common.setup"><tt class="docutils literal"><span class="pre">setup</span></tt> Module</a></li>
<li><a class="reference internal" href="#timeutils-module"><tt class="docutils literal"><span class="pre">timeutils</span></tt> Module</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="keystone.openstack.html"
                                  title="previous chapter">openstack Package</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="keystone.policy.html"
                                  title="next chapter">policy Package</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/keystone.openstack.common.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="keystone.policy.html" title="policy Package"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="keystone.openstack.html" title="openstack Package"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">keystone 2012.1-dev documentation</a> &raquo;</li>
          <li><a href="modules.html" >keystone</a> &raquo;</li>
          <li><a href="keystone.html" >keystone Package</a> &raquo;</li>
          <li><a href="keystone.openstack.html" accesskey="U">openstack Package</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, OpenStack, LLC.
      Last updated on Jun 22, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>