/usr/share/doc/keystone-doc/html/developing.html is in keystone-doc 1:2014.1.3-0ubuntu2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 | <!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>Developing with Keystone — keystone 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: '',
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>
<link rel="top" title="keystone documentation" href="index.html" />
<link rel="next" title="Keystone Architecture" href="architecture.html" />
<link rel="prev" title="keystone-manage" href="man/keystone-manage.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="developing-with-keystone">
<h1>Developing with Keystone<a class="headerlink" href="#developing-with-keystone" title="Permalink to this headline">¶</a></h1>
<div class="section" id="setup">
<h2>Setup<a class="headerlink" href="#setup" title="Permalink to this headline">¶</a></h2>
<p>Get your development environment set up according to <a class="reference internal" href="setup.html"><em>Setting up a Keystone development environment</em></a>. The
instructions from here will assume that you have installed keystone into a
virtualenv. If you chose not to, simply exclude “tools/with_venv.sh” from the
example commands below.</p>
</div>
<div class="section" id="configuring-keystone">
<h2>Configuring Keystone<a class="headerlink" href="#configuring-keystone" title="Permalink to this headline">¶</a></h2>
<p>keystone requires a configuration file. There is a sample configuration file
that can be used to get started:</p>
<div class="highlight-python"><div class="highlight"><pre>$ cp etc/keystone.conf.sample etc/keystone.conf
</pre></div>
</div>
<p>The defaults are enough to get you going, but you can make any changes if
needed.</p>
</div>
<div class="section" id="running-keystone">
<h2>Running Keystone<a class="headerlink" href="#running-keystone" title="Permalink to this headline">¶</a></h2>
<p>To run the keystone Admin and API server instances, use:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tools/with_venv.sh bin/keystone-all
</pre></div>
</div>
<p>this runs keystone with the configuration the etc/ directory of the project.
See <a class="reference internal" href="configuration.html"><em>Configuring Keystone</em></a> for details on how Keystone is configured. By default,
keystone is configured with SQL backends.</p>
</div>
<div class="section" id="interacting-with-keystone">
<h2>Interacting with Keystone<a class="headerlink" href="#interacting-with-keystone" title="Permalink to this headline">¶</a></h2>
<p>You can interact with Keystone through the command line using
<a class="reference internal" href="man/keystone-manage.html"><em>keystone-manage</em></a> which allows you to initialize keystone, etc.</p>
<p>You can also interact with Keystone through its REST API. There is a python
keystone client library <a class="reference external" href="https://github.com/openstack/python-keystoneclient">python-keystoneclient</a> which interacts exclusively
through the REST API, and which keystone itself uses to provide its
command-line interface.</p>
<p>When initially getting set up, after you’ve configured which databases to use,
you’re probably going to need to run the following to your database schema in
place:</p>
<div class="highlight-python"><div class="highlight"><pre>$ bin/keystone-manage db_sync
</pre></div>
</div>
</div>
<div class="section" id="database-schema-migrations">
<h2>Database Schema Migrations<a class="headerlink" href="#database-schema-migrations" title="Permalink to this headline">¶</a></h2>
<p>Keystone uses <a class="reference external" href="http://code.google.com/p/sqlalchemy-migrate/">SQLAlchemy-migrate</a> to migrate
the SQL database between revisions. For core components, the migrations are
kept in a central repository under <tt class="docutils literal"><span class="pre">keystone/common/sql/migrate_repo</span></tt>.</p>
<p>Extensions should be created as directories under <tt class="docutils literal"><span class="pre">keystone/contrib</span></tt>. An
extension that requires SQL migrations should not change the common repository,
but should instead have its own repository. This repository must be in the
extension’s directory in <tt class="docutils literal"><span class="pre">keystone/contrib/<extension>/migrate_repo</span></tt>. In
addition, it needs a subdirectory named <tt class="docutils literal"><span class="pre">versions</span></tt>. For example, if the
extension name is <tt class="docutils literal"><span class="pre">my_extension</span></tt> then the directory structure would be
<tt class="docutils literal"><span class="pre">keystone/contrib/my_extension/migrate_repo/versions/</span></tt>. For the migration to
work, both the <tt class="docutils literal"><span class="pre">migrate_repo</span></tt> and <tt class="docutils literal"><span class="pre">versions</span></tt> subdirectories must have
<tt class="docutils literal"><span class="pre">__init__.py</span></tt> files. SQLAlchemy-migrate will look for a configuration file in
the <tt class="docutils literal"><span class="pre">migrate_repo</span></tt> named <tt class="docutils literal"><span class="pre">migrate.cfg</span></tt>. This conforms to a key/value <cite>ini</cite>
file format. A sample configuration file with the minimal set of values is:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">db_settings</span><span class="p">]</span>
<span class="n">repository_id</span><span class="o">=</span><span class="n">my_extension</span>
<span class="n">version_table</span><span class="o">=</span><span class="n">migrate_version</span>
<span class="n">required_dbs</span><span class="o">=</span><span class="p">[]</span>
</pre></div>
</div>
<p>The directory <tt class="docutils literal"><span class="pre">keystone/contrib/example</span></tt> contains a sample extension
migration.</p>
<p>Migrations must be explicitly run for each extension individually. To run a
migration for a specific extension, simply run:</p>
<div class="highlight-python"><div class="highlight"><pre>$ keystone-manage db_sync --extension <name>
</pre></div>
</div>
</div>
<div class="section" id="initial-sample-data">
<h2>Initial Sample Data<a class="headerlink" href="#initial-sample-data" title="Permalink to this headline">¶</a></h2>
<p>There is an included script which is helpful in setting up some initial sample
data for use with keystone:</p>
<div class="highlight-python"><div class="highlight"><pre>$ OS_SERVICE_TOKEN=ADMIN tools/with_venv.sh tools/sample_data.sh
</pre></div>
</div>
<p>Notice it requires a service token read from an environment variable for
authentication. The default value “ADMIN” is from the <tt class="docutils literal"><span class="pre">admin_token</span></tt>
option in the <tt class="docutils literal"><span class="pre">[DEFAULT]</span></tt> section in <tt class="docutils literal"><span class="pre">etc/keystone.conf</span></tt>.</p>
<p>Once run, you can see the sample data that has been created by using the
<a class="reference external" href="https://github.com/openstack/python-keystoneclient">python-keystoneclient</a> command-line interface:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tools/with_venv.sh keystone --os-token ADMIN --os-endpoint http://127.0.0.1:35357/v2.0/ user-list
</pre></div>
</div>
</div>
<div class="section" id="filtering-responsibilities-between-controllers-and-drivers">
<h2>Filtering responsibilities between controllers and drivers<a class="headerlink" href="#filtering-responsibilities-between-controllers-and-drivers" title="Permalink to this headline">¶</a></h2>
<p>Keystone supports the specification of filtering on list queries as part of the
v3 identity API. By default these queries are satisfied in the controller
class when a controller calls the <tt class="docutils literal"><span class="pre">wrap_collection</span></tt> method at the end of a
<tt class="docutils literal"><span class="pre">list_{entity}</span></tt> method. However, to enable optimum performance, any driver
can implement some or all of the specified filters (for example, by adding
filtering to the generated SQL statements to generate the list).</p>
<p>The communication of the filter details between the controller level and its
drivers is handled by the passing of a reference to a Hints object,
which is a list of dicts describing the filters. A driver that satisfies a
filter must delete the filter from the Hints object so that when it is returned
back to the controller level, it knows to only execute any unsatisfied
filters.</p>
<p>The contract for a driver for <tt class="docutils literal"><span class="pre">list_{entity}</span></tt> methods is therefore:</p>
<ul class="simple">
<li>It MUST return a list of entities of the specified type</li>
<li>It MAY either just return all such entities, or alternatively reduce the
list by filtering for one or more of the specified filters in the passed
Hints reference, and removing any such satisfied filters.</li>
</ul>
</div>
<div class="section" id="entity-list-truncation-by-drivers">
<h2>Entity list truncation by drivers<a class="headerlink" href="#entity-list-truncation-by-drivers" title="Permalink to this headline">¶</a></h2>
<p>Keystone supports the ability for a deployment to restrict the number of
entries returned from <tt class="docutils literal"><span class="pre">list_{entity}</span></tt> methods, typically to prevent poorly
formed searches (e.g. without sufficient filters) from becoming a performance
issue.</p>
<p>These limits are set in the configuration file, either for a specific driver or
across all drivers. These limits are read at the Manager level and passed into
individual drivers as part of the Hints list object. A driver should try and
honor any such limit if possible, but if it is unable to do so then it may
ignore it (and the truncation of the returned list of entities will happen at
the controller level).</p>
</div>
<div class="section" id="testing">
<h2>Testing<a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h2>
<div class="section" id="running-tests">
<h3>Running Tests<a class="headerlink" href="#running-tests" title="Permalink to this headline">¶</a></h3>
<p>Before running tests, you should have <tt class="docutils literal"><span class="pre">tox</span></tt> installed and available in your
environment (in addition to the other external dependencies in <a class="reference internal" href="setup.html"><em>Setting up a Keystone development environment</em></a>):</p>
<div class="highlight-python"><div class="highlight"><pre>$ pip install tox
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">You may need to perform both the above operation and the next inside a
python virtualenv, or prefix the above command with <tt class="docutils literal"><span class="pre">sudo</span></tt>, depending on
your preference.</p>
</div>
<p>To execute the full suite of tests maintained within Keystone, simply run:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tox
</pre></div>
</div>
<p>This iterates over multiple configuration variations, and uses external
projects to do light integration testing to verify the Identity API against
other projects.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The first time you run <tt class="docutils literal"><span class="pre">tox</span></tt>, it will take additional time to build
virtualenvs. You can later use the <tt class="docutils literal"><span class="pre">-r</span></tt> option with <tt class="docutils literal"><span class="pre">tox</span></tt> to rebuild
your virtualenv in a similar manner.</p>
</div>
<p>To run tests for one or more specific test environments (for example, the most
common configuration of Python 2.7 and PEP-8), list the environments with the
<tt class="docutils literal"><span class="pre">-e</span></tt> option, separated by spaces:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tox -e py27,pep8
</pre></div>
</div>
<p>See <tt class="docutils literal"><span class="pre">tox.ini</span></tt> for the full list of available test environments.</p>
<div class="section" id="running-with-pdb">
<h4>Running with PDB<a class="headerlink" href="#running-with-pdb" title="Permalink to this headline">¶</a></h4>
<p>Using PDB breakpoints with tox and testr normally doesn’t work since the tests
just fail with a BdbQuit exception rather than stopping at the breakpoint.</p>
<p>To run with PDB breakpoints during testing, use the <tt class="docutils literal"><span class="pre">debug</span></tt> tox environment
rather than <tt class="docutils literal"><span class="pre">py27</span></tt>. Here’s an example, passing the name of a test since
you’ll normally only want to run the test that hits your breakpoint:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tox -e debug keystone.tests.test_auth.AuthWithToken.test_belongs_to
</pre></div>
</div>
<p>For reference, the <tt class="docutils literal"><span class="pre">debug</span></tt> tox environment implements the instructions
here: <a class="reference external" href="https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests">https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests</a></p>
</div>
</div>
<div class="section" id="test-structure">
<h3>Test Structure<a class="headerlink" href="#test-structure" title="Permalink to this headline">¶</a></h3>
<p>Not all of the tests in the tests directory are strictly unit tests. Keystone
intentionally includes tests that run the service locally and drives the entire
configuration to achieve basic functional testing.</p>
<p>For the functional tests, an in-memory key-value store is used to keep the
tests fast.</p>
<p>Within the tests directory, the general structure of the tests is a basic
set of tests represented under a test class, and then subclasses of those
tests under other classes with different configurations to drive different
backends through the APIs.</p>
<p>For example, <tt class="docutils literal"><span class="pre">test_backend.py</span></tt> has a sequence of tests under the class
<tt class="docutils literal"><span class="pre">IdentityTests</span></tt> that will work with the default drivers as configured in
this projects etc/ directory. <tt class="docutils literal"><span class="pre">test_backend_sql.py</span></tt> subclasses those tests,
changing the configuration by overriding with configuration files stored in
the tests directory aimed at enabling the SQL backend for the Identity module.</p>
<p>Likewise, <tt class="docutils literal"><span class="pre">test_keystoneclient.py</span></tt> takes advantage of the tests written
against <tt class="docutils literal"><span class="pre">KeystoneClientTests</span></tt> to verify the same tests function through
different drivers and releases of the Keystone client.</p>
<p>The class <tt class="docutils literal"><span class="pre">CompatTestCase</span></tt> does the work of checking out a specific version
of python-keystoneclient, and then verifying it against a temporarily running
local instance to explicitly verify basic functional testing across the API.</p>
</div>
<div class="section" id="testing-schema-migrations">
<h3>Testing Schema Migrations<a class="headerlink" href="#testing-schema-migrations" title="Permalink to this headline">¶</a></h3>
<p>The application of schema migrations can be tested using SQLAlchemy Migrate’s
built-in test runner, one migration at a time.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This may leave your database in an inconsistent state; attempt this in non-production environments only!</p>
</div>
<p>This is useful for testing the <em>next</em> migration in sequence (both forward &
backward) in a database under version control:</p>
<div class="highlight-python"><div class="highlight"><pre>python keystone/common/sql/migrate_repo/manage.py test \
--url=sqlite:///test.db \
--repository=keystone/common/sql/migrate_repo/
</pre></div>
</div>
<p>This command references to a SQLite database (test.db) to be used. Depending on
the migration, this command alone does not make assertions as to the integrity
of your data during migration.</p>
</div>
<div class="section" id="writing-tests">
<h3>Writing Tests<a class="headerlink" href="#writing-tests" title="Permalink to this headline">¶</a></h3>
<p>To add tests covering all drivers, update the relevant base test class
(<tt class="docutils literal"><span class="pre">test_backend.py</span></tt>, <tt class="docutils literal"><span class="pre">test_legacy_compat.py</span></tt>, and
<tt class="docutils literal"><span class="pre">test_keystoneclient.py</span></tt>).</p>
<p>To add new drivers, subclass the <tt class="docutils literal"><span class="pre">test_backend.py</span></tt> (look towards
<tt class="docutils literal"><span class="pre">test_backend_sql.py</span></tt> or <tt class="docutils literal"><span class="pre">test_backend_kvs.py</span></tt> for examples) and update the
configuration of the test class in <tt class="docutils literal"><span class="pre">setUp()</span></tt>.</p>
</div>
<div class="section" id="further-testing">
<h3>Further Testing<a class="headerlink" href="#further-testing" title="Permalink to this headline">¶</a></h3>
<p><a class="reference external" href="http://devstack.org/">devstack</a> is the <em>best</em> way to quickly deploy keystone with the rest of the
OpenStack universe and should be critical step in your development workflow!</p>
<p>You may also be interested in either the
<a class="reference external" href="http://ci.openstack.org">OpenStack Continuous Integration Infrastructure</a> or the
<a class="reference external" href="https://github.com/openstack/tempest">OpenStack Integration Testing Project</a>.</p>
</div>
<div class="section" id="ldap-tests">
<h3>LDAP Tests<a class="headerlink" href="#ldap-tests" title="Permalink to this headline">¶</a></h3>
<p>LDAP has a fake backend that performs rudimentary operations. If you
are building more significant LDAP functionality, you should test against
a live LDAP server. Devstack has an option to set up a directory server for
Keystone to use. Add ldap to the <tt class="docutils literal"><span class="pre">ENABLED_SERVICES</span></tt> environment variable,
and set environment variables <tt class="docutils literal"><span class="pre">KEYSTONE_IDENTITY_BACKEND=ldap</span></tt> and
<tt class="docutils literal"><span class="pre">KEYSTONE_CLEAR_LDAP=yes</span></tt> in your <tt class="docutils literal"><span class="pre">localrc</span></tt> file.</p>
<p>The unit tests can be run against a live server with
<tt class="docutils literal"><span class="pre">keystone/tests/test_ldap_livetest.py</span></tt>. The default password is <tt class="docutils literal"><span class="pre">test</span></tt> but if you have
installed devstack with a different LDAP password, modify the file
<tt class="docutils literal"><span class="pre">keystone/tests/backend_liveldap.conf</span></tt> to reflect your password.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To run the live tests you need to set the environment variable <tt class="docutils literal"><span class="pre">ENABLE_LDAP_LIVE_TEST</span></tt>
to a non-negative value.</p>
</div>
</div>
</div>
<div class="section" id="generating-updated-sample-config-file">
<h2>Generating Updated Sample Config File<a class="headerlink" href="#generating-updated-sample-config-file" title="Permalink to this headline">¶</a></h2>
<p>Keystone’s sample configuration file <tt class="docutils literal"><span class="pre">etc/keystone.conf.sample</span></tt> is automatically
generated based upon all of the options available within Keystone. These options
are sourced from the many files around Keystone as well as some external libraries.</p>
<p>If new options are added, primarily located in <tt class="docutils literal"><span class="pre">keystone.common.config</span></tt>, a new
sample configuration file needs to be generated. Generating a new sample configuration
to be included in a commit run:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tox -esample_config -r
</pre></div>
</div>
<p>The tox command will place an updated sample config in <tt class="docutils literal"><span class="pre">etc/keystone.conf.sample</span></tt>.</p>
<p>If there is a new external library (e.g. <tt class="docutils literal"><span class="pre">oslo.messaging</span></tt>) that utilizes the
<tt class="docutils literal"><span class="pre">oslo.config</span></tt> package for configuration, it can be added to the list of libraries
found in <tt class="docutils literal"><span class="pre">tools/config/oslo.config.generator.rc</span></tt>.</p>
</div>
<div class="section" id="translated-responses">
<h2>Translated responses<a class="headerlink" href="#translated-responses" title="Permalink to this headline">¶</a></h2>
<p>The Keystone server can provide error responses translated into the language in
the <tt class="docutils literal"><span class="pre">Accept-Language</span></tt> header of the request. In order to test this in your
development environment, there’s a couple of things you need to do.</p>
<ol class="arabic">
<li><p class="first">Build the message files. Run the following command in your keystone
directory:</p>
<div class="highlight-python"><div class="highlight"><pre>$ python setup.py compile_catalog
</pre></div>
</div>
</li>
</ol>
<p>This will generate .mo files like keystone/locale/[lang]/LC_MESSAGES/[lang].mo</p>
<ol class="arabic" start="2">
<li><p class="first">When running Keystone, set the <tt class="docutils literal"><span class="pre">KEYSTONE_LOCALEDIR</span></tt> environment variable
to the keystone/locale directory. For example:</p>
<div class="highlight-python"><div class="highlight"><pre>$ KEYSTONE_LOCALEDIR=/opt/stack/keystone/keystone/locale keystone-all
</pre></div>
</div>
</li>
</ol>
<p>Now you can get a translated error response:</p>
<div class="highlight-python"><div class="highlight"><pre>$ curl -s -H "Accept-Language: zh" http://localhost:5000/notapath | python -mjson.tool
{
"error": {
"code": 404,
"message": "\u627e\u4e0d\u5230\u8cc7\u6e90\u3002",
"title": "Not Found"
}
}
</pre></div>
</div>
</div>
<div class="section" id="caching-layer">
<h2>Caching Layer<a class="headerlink" href="#caching-layer" title="Permalink to this headline">¶</a></h2>
<p>The caching layer is designed to be applied to any <tt class="docutils literal"><span class="pre">manager</span></tt> object within Keystone
via the use of the <tt class="docutils literal"><span class="pre">on_arguments</span></tt> decorator provided in the <tt class="docutils literal"><span class="pre">keystone.common.cache</span></tt>
module. This decorator leverages <a class="reference external" href="http://dogpilecache.readthedocs.org/">dogpile.cache</a> caching system to provide a flexible
caching backend.</p>
<p>It is recommended that each of the managers have an independent toggle within the config
file to enable caching. The easiest method to utilize the toggle within the
configuration file is to define a <tt class="docutils literal"><span class="pre">caching</span></tt> boolean option within that manager’s
configuration section (e.g. <tt class="docutils literal"><span class="pre">identity</span></tt>). Once that option is defined you can
pass function to the <tt class="docutils literal"><span class="pre">on_arguments</span></tt> decorator with the named argument <tt class="docutils literal"><span class="pre">should_cache_fn</span></tt>.
In the <tt class="docutils literal"><span class="pre">keystone.common.cache</span></tt> module, there is a function called <tt class="docutils literal"><span class="pre">should_cache_fn</span></tt>,
which will provide a reference, to a function, that will consult the global cache
<tt class="docutils literal"><span class="pre">enabled</span></tt> option as well as the specific manager’s caching enable toggle.</p>
<blockquote>
<div><div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If a section-specific boolean option is not defined in the config section specified when
calling <tt class="docutils literal"><span class="pre">should_cache_fn</span></tt>, the returned function reference will default to enabling
caching for that <tt class="docutils literal"><span class="pre">manager</span></tt>.</p>
</div>
</div></blockquote>
<p>Example use of cache and <tt class="docutils literal"><span class="pre">should_cache_fn</span></tt> (in this example, <tt class="docutils literal"><span class="pre">token</span></tt> is the manager):</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">keystone.common</span> <span class="kn">import</span> <span class="n">cache</span>
<span class="n">SHOULD_CACHE</span> <span class="o">=</span> <span class="n">cache</span><span class="o">.</span><span class="n">should_cache_fn</span><span class="p">(</span><span class="s">'token'</span><span class="p">)</span>
<span class="nd">@cache.on_arguments</span><span class="p">(</span><span class="n">should_cache_fn</span><span class="o">=</span><span class="n">SHOULD_CACHE</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">cacheable_function</span><span class="p">(</span><span class="n">arg1</span><span class="p">,</span> <span class="n">arg2</span><span class="p">,</span> <span class="n">arg3</span><span class="p">):</span>
<span class="o">...</span>
<span class="k">return</span> <span class="n">some_value</span>
</pre></div>
</div>
<p>With the above example, each call to the <tt class="docutils literal"><span class="pre">cacheable_function</span></tt> would check to see if
the arguments passed to it matched a currently valid cached item. If the return value
was cached, the caching layer would return the cached value; if the return value was
not cached, the caching layer would call the function, pass the value to the <tt class="docutils literal"><span class="pre">SHOULD_CACHE</span></tt>
function reference, which would then determine if caching was globally enabled and enabled
for the <tt class="docutils literal"><span class="pre">token</span></tt> manager. If either caching toggle is disabled, the value is returned but
not cached.</p>
<p>It is recommended that each of the managers have an independent configurable time-to-live (TTL).
If a configurable TTL has been defined for the manager configuration section, it is possible to
pass it to the <tt class="docutils literal"><span class="pre">cache.on_arguments</span></tt> decorator with the named-argument <tt class="docutils literal"><span class="pre">expiration_time</span></tt>. For
consistency, it is recommended that this option be called <tt class="docutils literal"><span class="pre">cache_time</span></tt> and default to <tt class="docutils literal"><span class="pre">None</span></tt>.
If the <tt class="docutils literal"><span class="pre">expiration_time</span></tt> argument passed to the decorator is set to <tt class="docutils literal"><span class="pre">None</span></tt>, the expiration
time will be set to the global default (<tt class="docutils literal"><span class="pre">expiration_time</span></tt> option in the <tt class="docutils literal"><span class="pre">[cache]</span></tt>
configuration section.</p>
<p>Example of using a section specific <tt class="docutils literal"><span class="pre">cache_time</span></tt> (in this example, <tt class="docutils literal"><span class="pre">identity</span></tt> is the manager):</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">keystone.common</span> <span class="kn">import</span> <span class="n">cache</span>
<span class="n">SHOULD_CACHE</span> <span class="o">=</span> <span class="n">cache</span><span class="o">.</span><span class="n">should_cache_fn</span><span class="p">(</span><span class="s">'identity'</span><span class="p">)</span>
<span class="nd">@cache.on_arguments</span><span class="p">(</span><span class="n">should_cache_fn</span><span class="o">=</span><span class="n">SHOULD_CACHE</span><span class="p">,</span>
<span class="n">expiration_time</span><span class="o">=</span><span class="n">CONF</span><span class="o">.</span><span class="n">identity</span><span class="o">.</span><span class="n">cache_time</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">cachable_function</span><span class="p">(</span><span class="n">arg1</span><span class="p">,</span> <span class="n">arg2</span><span class="p">,</span> <span class="n">arg3</span><span class="p">):</span>
<span class="o">...</span>
<span class="k">return</span> <span class="n">some_value</span>
</pre></div>
</div>
<p>For cache invalidation, the <tt class="docutils literal"><span class="pre">on_arguments</span></tt> decorator will add an <tt class="docutils literal"><span class="pre">invalidate</span></tt> method
(attribute) to your decorated function. To invalidate the cache, you pass the same arguments
to the <tt class="docutils literal"><span class="pre">invalidate</span></tt> method as you would the normal function.</p>
<p>Example (using the above cacheable_function):</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">invalidate_cache</span><span class="p">(</span><span class="n">arg1</span><span class="p">,</span> <span class="n">arg2</span><span class="p">,</span> <span class="n">arg3</span><span class="p">):</span>
<span class="n">cacheable_function</span><span class="o">.</span><span class="n">invalidate</span><span class="p">(</span><span class="n">arg1</span><span class="p">,</span> <span class="n">arg2</span><span class="p">,</span> <span class="n">arg3</span><span class="p">)</span>
</pre></div>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">The <tt class="docutils literal"><span class="pre">on_arguments</span></tt> decorator does not accept keyword-arguments/named arguments. An
exception will be raised if keyword arguments are passed to a caching-decorated function.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In all cases methods work the same as functions except if you are attempting to invalidate
the cache on a decorated bound-method, you need to pass <tt class="docutils literal"><span class="pre">self</span></tt> to the <tt class="docutils literal"><span class="pre">invalidate</span></tt>
method as the first argument before the arguments.</p>
</div>
</div>
<div class="section" id="dogpile-cache-based-key-value-store-kvs">
<h2>dogpile.cache based Key-Value-Store (KVS)<a class="headerlink" href="#dogpile-cache-based-key-value-store-kvs" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">dogpile.cache</span></tt> based KVS system has been designed to allow for flexible stores for the
backend of the KVS system. The implementation allows for the use of any normal <tt class="docutils literal"><span class="pre">dogpile.cache</span></tt>
cache backends to be used as a store. All interfacing to the KVS system happens via the
<tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> object located at <tt class="docutils literal"><span class="pre">keystone.common.kvs.KeyValueStore</span></tt>.</p>
<p>To utilize the KVS system an instantiation of the <tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> class is needed. To accquire
a KeyValueStore instantiation use the <tt class="docutils literal"><span class="pre">keystone.common.kvs.get_key_value_store</span></tt> factory
function. This factory will either create a new <tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> object or retrieve the
already instantiated <tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> object by the name passed as an argument. The object must
be configured before use. The KVS object will only be retrievable with the
<tt class="docutils literal"><span class="pre">get_key_value_store</span></tt> function while there is an active reference outside of the registry.
Once all references have been removed the object is gone (the registry uses a <tt class="docutils literal"><span class="pre">weakref</span></tt> to
match the object to the name).</p>
<p>Example Instantiation and Configuration:</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">kvs_store</span> <span class="o">=</span> <span class="n">kvs</span><span class="o">.</span><span class="n">get_key_value_store</span><span class="p">(</span><span class="s">'TestKVSRegion'</span><span class="p">)</span>
<span class="n">kvs_store</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s">'openstack.kvs.Memory'</span><span class="p">,</span> <span class="o">...</span><span class="p">)</span>
</pre></div>
</div>
<p>Any keyword arguments passed to the configure method that are not defined as part of the
KeyValueStore object configuration are passed to the backend for further configuration (e.g.
memcached servers, lock_timeout, etc).</p>
<p>The memcached backend uses the Keystone manager mechanism to support the use of any of the
provided memcached backends (<tt class="docutils literal"><span class="pre">bmemcached</span></tt>, <tt class="docutils literal"><span class="pre">pylibmc</span></tt>, and basic <tt class="docutils literal"><span class="pre">memcached</span></tt>).
By default the <tt class="docutils literal"><span class="pre">memcached</span></tt> backend is used. Currently the Memcache URLs come from the
<tt class="docutils literal"><span class="pre">servers</span></tt> option in the <tt class="docutils literal"><span class="pre">[memcache]</span></tt> configuration section of the Keystone config.</p>
<p>The following is an example showing how to configure the KVS system to use a
KeyValueStore object named “TestKVSRegion” and a specific Memcached driver:</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">kvs_store</span> <span class="o">=</span> <span class="n">kvs</span><span class="o">.</span><span class="n">get_key_value_store</span><span class="p">(</span><span class="s">'TestKVSRegion'</span><span class="p">)</span>
<span class="n">kvs_store</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s">'openstack.kvs.Memcached'</span><span class="p">,</span> <span class="n">memcached_backend</span><span class="o">=</span><span class="s">'Memcached'</span><span class="p">)</span>
</pre></div>
</div>
<p>The memcached backend supports a mechanism to supply an explicit TTL (in seconds) to all keys
set via the KVS object. This is accomplished by passing the argument <tt class="docutils literal"><span class="pre">memcached_expire_time</span></tt>
as a keyword argument to the <tt class="docutils literal"><span class="pre">configure</span></tt> method. Passing the <tt class="docutils literal"><span class="pre">memcache_expire_time</span></tt> argument
will cause the <tt class="docutils literal"><span class="pre">time</span></tt> argument to be added to all <tt class="docutils literal"><span class="pre">set</span></tt> and <tt class="docutils literal"><span class="pre">set_multi</span></tt> calls performed by
the memcached client. <tt class="docutils literal"><span class="pre">memcached_expire_time</span></tt> is an argument exclusive to the memcached dogpile
backend, and will be ignored if passed to another backend:</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">kvs_store</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s">'openstack.kvs.Memcached'</span><span class="p">,</span> <span class="n">memcached_backend</span><span class="o">=</span><span class="s">'Memcached'</span><span class="p">,</span>
<span class="n">memcached_expire_time</span><span class="o">=</span><span class="mi">86400</span><span class="p">)</span>
</pre></div>
</div>
<p>If an explicit TTL is configured via the <tt class="docutils literal"><span class="pre">memcached_expire_time</span></tt> argument, it is possible to
exempt specific keys from receiving the TTL by passing the argument <tt class="docutils literal"><span class="pre">no_expiry_keys</span></tt> (list)
as a keyword argument to the <tt class="docutils literal"><span class="pre">configure</span></tt> method. <tt class="docutils literal"><span class="pre">no_expiry_keys</span></tt> should be supported by
all OpenStack-specific dogpile backends (memcached) that have the ability to set an explicit TTL:</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="n">kvs_store</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s">'openstack.kvs.Memcached'</span><span class="p">,</span> <span class="n">memcached_backend</span><span class="o">=</span><span class="s">'Memcached'</span><span class="p">,</span>
<span class="n">memcached_expire_time</span><span class="o">=</span><span class="mi">86400</span><span class="p">,</span> <span class="n">no_expiry_keys</span><span class="o">=</span><span class="p">[</span><span class="s">'key'</span><span class="p">,</span> <span class="s">'second_key'</span><span class="p">,</span> <span class="o">...</span><span class="p">])</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>For the non-expiring keys functionality to work, the backend must support the ability for
the region to set the key_mangler on it and have the attribute <tt class="docutils literal"><span class="pre">raw_no_expiry_keys</span></tt>.
In most cases, support for setting the key_mangler on the backend is handled by allowing
the region object to set the <tt class="docutils literal"><span class="pre">key_mangler</span></tt> attribute on the backend.</p>
<p>The <tt class="docutils literal"><span class="pre">raw_no_expiry_keys</span></tt> attribute is expected to be used to hold the values of the
keyword argument <tt class="docutils literal"><span class="pre">no_expiry_keys</span></tt> prior to hashing. It is the responsibility of the
backend to use these raw values to determine if a key should be exempt from expiring
and not set the TTL on the non-expiring keys when the <tt class="docutils literal"><span class="pre">set</span></tt> or <tt class="docutils literal"><span class="pre">set_multi</span></tt> methods are
called.</p>
<p class="last">Typically the key will be hashed by the region using its key_mangler method
before being passed to the backend to set the value in the KeyValueStore. This
means that in most cases, the backend will need to either pre-compute the hashed versions
of the keys (when the key_mangler is set) and store a cached copy, or hash each item in
the <tt class="docutils literal"><span class="pre">raw_no_expiry_keys</span></tt> attribute on each call to <tt class="docutils literal"><span class="pre">.set()</span></tt> and <tt class="docutils literal"><span class="pre">.set_multi()</span></tt>. The
<tt class="docutils literal"><span class="pre">memcached</span></tt> backend handles this hashing and caching of the keys by utilizing an
<tt class="docutils literal"><span class="pre">@property</span></tt> method for the <tt class="docutils literal"><span class="pre">.key_mangler</span></tt> attribute on the backend and utilizing the
associated <tt class="docutils literal"><span class="pre">.settr()</span></tt> method to front-load the hashing work at attribute set time.</p>
</div>
<p>Once a KVS object has been instantiated the method of interacting is the same as most memcache
implementations:</p>
<div class="code python highlight-python"><div class="highlight"><pre>kvs_store = kvs.get_key_value_store('TestKVSRegion')
kvs_store.configure(...)
# Set a Value
kvs_store.set(<Key>, <Value>)
# Retrieve a value:
retrieved_value = kvs_store.get(<key>)
# Delete a key/value pair:
kvs_store.delete(<key>)
# multi-get:
kvs_store.get_multi([<key>, <key>, ...])
# multi-set:
kvs_store.set_multi(dict(<key>=<value>, <key>=<value>, ...))
# multi-delete
kvs_store.delete_multi([<key>, <key>, ...])
</pre></div>
</div>
<p>There is a global configuration option to be aware of (that can be set in the <tt class="docutils literal"><span class="pre">[kvs]</span></tt> section of
the Keystone configuration file): <tt class="docutils literal"><span class="pre">enable_key_mangler</span></tt> can be set top false, disabling the use of
key_manglers (modification of the key when saving to the backend to help prevent
collisions or exceeding key size limits with memcached).</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The <tt class="docutils literal"><span class="pre">enable_key_mangler</span></tt> option in the <tt class="docutils literal"><span class="pre">[kvs]</span></tt> section of the Keystone configuration file
is not the same option (and does not affect the cache-layer key manglers) from the option in the
<tt class="docutils literal"><span class="pre">[cache]</span></tt> section of the configuration file. Similarly the <tt class="docutils literal"><span class="pre">[cache]</span></tt> section options
relating to key manglers has no bearing on the <tt class="docutils literal"><span class="pre">[kvs]</span></tt> objects.</p>
</div>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">Setting the <tt class="docutils literal"><span class="pre">enable_key_mangler</span></tt> option to False can have detrimental effects on the
KeyValueStore backend. It is recommended that this value is not set to False except for
debugging issues with the <tt class="docutils literal"><span class="pre">dogpile.cache</span></tt> backend itself.</p>
</div>
<p>Any backends that are to be used with the <tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> system need to be registered with
dogpile. For in-tree/provided backends, the registration should occur in
<tt class="docutils literal"><span class="pre">keystone/common/kvs/__init__.py</span></tt>. For backends that are developed out of tree, the location
should be added to the <tt class="docutils literal"><span class="pre">backends</span></tt> option in the <tt class="docutils literal"><span class="pre">[kvs]</span></tt> section of the Keystone configuration:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[</span><span class="n">kvs</span><span class="p">]</span>
<span class="n">backends</span> <span class="o">=</span> <span class="n">backend_module1</span><span class="o">.</span><span class="n">backend_class1</span><span class="p">,</span><span class="n">backend_module2</span><span class="o">.</span><span class="n">backend_class2</span>
</pre></div>
</div>
<p>All registered backends will receive the “short name” of “openstack.kvs.<class name>” for use in the
<tt class="docutils literal"><span class="pre">configure</span></tt> method on the <tt class="docutils literal"><span class="pre">KeyValueStore</span></tt> object. The <tt class="docutils literal"><span class="pre"><class</span> <span class="pre">name></span></tt> of a backend must be
globally unique.</p>
</div>
<div class="section" id="dogpile-cache-based-mongodb-nosql-backend">
<h2>dogpile.cache based MongoDB (NoSQL) backend<a class="headerlink" href="#dogpile-cache-based-mongodb-nosql-backend" title="Permalink to this headline">¶</a></h2>
<p>The <tt class="docutils literal"><span class="pre">dogpile.cache</span></tt> based MongoDB backend implementation allows for various MongoDB
configurations, e.g., standalone, a replica set, sharded replicas, with or without SSL,
use of TTL type collections, etc.</p>
<p>Example of typical configuration for MongoDB backend:</p>
<div class="code python highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">dogpile.cache</span> <span class="kn">import</span> <span class="n">region</span>
<span class="n">arguments</span> <span class="o">=</span> <span class="p">{</span>
<span class="s">'db_hosts'</span><span class="p">:</span> <span class="s">'localhost:27017'</span><span class="p">,</span>
<span class="s">'db_name'</span><span class="p">:</span> <span class="s">'ks_cache'</span><span class="p">,</span>
<span class="s">'cache_collection'</span><span class="p">:</span> <span class="s">'cache'</span><span class="p">,</span>
<span class="s">'username'</span><span class="p">:</span> <span class="s">'test_user'</span><span class="p">,</span>
<span class="s">'password'</span><span class="p">:</span> <span class="s">'test_password'</span><span class="p">,</span>
<span class="c"># optional arguments</span>
<span class="s">'son_manipulator'</span><span class="p">:</span> <span class="s">'my_son_manipulator_impl'</span>
<span class="p">}</span>
<span class="n">region</span><span class="o">.</span><span class="n">make_region</span><span class="p">()</span><span class="o">.</span><span class="n">configure</span><span class="p">(</span><span class="s">'keystone.cache.mongo'</span><span class="p">,</span>
<span class="n">arguments</span><span class="o">=</span><span class="n">arguments</span><span class="p">)</span>
</pre></div>
</div>
<p>The optional <cite>son_manipulator</cite> is used to manipulate custom data type while its saved in
or retrieved from MongoDB. If the dogpile cached values contain built-in data types and no
custom classes, then the provided implementation class is sufficient. For further details, refer
<a class="reference external" href="http://api.mongodb.org/python/current/examples/custom_type.html#automatic-encoding-and-decoding">http://api.mongodb.org/python/current/examples/custom_type.html#automatic-encoding-and-decoding</a></p>
<p>Similar to other backends, this backend can be added via keystone configuration in
<tt class="docutils literal"><span class="pre">keystone.conf</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre>[cache]
# Global cache functionality toggle.
enabled = True
# Referring to specific cache backend
backend = keystone.cache.mongo
# Backend specific configuration arguments
backend_argument = db_hosts:localhost:27017
backend_argument = db_name:ks_cache
backend_argument = cache_collection:cache
backend_argument = username:test_user
backend_argument = password:test_password
</pre></div>
</div>
<p>This backend is registered in <tt class="docutils literal"><span class="pre">keystone.common.cache.core</span></tt> module. So, its usage
is similar to other dogpile caching backends as it implements the same dogpile APIs.</p>
</div>
<div class="section" id="building-the-documentation">
<h2>Building the Documentation<a class="headerlink" href="#building-the-documentation" title="Permalink to this headline">¶</a></h2>
<p>The documentation is generated with Sphinx uning the tox command. To create HTML docs and man pages:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tox -e docs
</pre></div>
</div>
<p>The results are in the docs/build/html and docs/build/man directories respectively.</p>
</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="#">Developing with Keystone</a><ul>
<li><a class="reference internal" href="#setup">Setup</a></li>
<li><a class="reference internal" href="#configuring-keystone">Configuring Keystone</a></li>
<li><a class="reference internal" href="#running-keystone">Running Keystone</a></li>
<li><a class="reference internal" href="#interacting-with-keystone">Interacting with Keystone</a></li>
<li><a class="reference internal" href="#database-schema-migrations">Database Schema Migrations</a></li>
<li><a class="reference internal" href="#initial-sample-data">Initial Sample Data</a></li>
<li><a class="reference internal" href="#filtering-responsibilities-between-controllers-and-drivers">Filtering responsibilities between controllers and drivers</a></li>
<li><a class="reference internal" href="#entity-list-truncation-by-drivers">Entity list truncation by drivers</a></li>
<li><a class="reference internal" href="#testing">Testing</a><ul>
<li><a class="reference internal" href="#running-tests">Running Tests</a><ul>
<li><a class="reference internal" href="#running-with-pdb">Running with PDB</a></li>
</ul>
</li>
<li><a class="reference internal" href="#test-structure">Test Structure</a></li>
<li><a class="reference internal" href="#testing-schema-migrations">Testing Schema Migrations</a></li>
<li><a class="reference internal" href="#writing-tests">Writing Tests</a></li>
<li><a class="reference internal" href="#further-testing">Further Testing</a></li>
<li><a class="reference internal" href="#ldap-tests">LDAP Tests</a></li>
</ul>
</li>
<li><a class="reference internal" href="#generating-updated-sample-config-file">Generating Updated Sample Config File</a></li>
<li><a class="reference internal" href="#translated-responses">Translated responses</a></li>
<li><a class="reference internal" href="#caching-layer">Caching Layer</a></li>
<li><a class="reference internal" href="#dogpile-cache-based-key-value-store-kvs">dogpile.cache based Key-Value-Store (KVS)</a></li>
<li><a class="reference internal" href="#dogpile-cache-based-mongodb-nosql-backend">dogpile.cache based MongoDB (NoSQL) backend</a></li>
<li><a class="reference internal" href="#building-the-documentation">Building the Documentation</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="man/keystone-manage.html"
title="previous chapter">keystone-manage</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="architecture.html"
title="next chapter">Keystone Architecture</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/developing.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="architecture.html" title="Keystone Architecture"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="man/keystone-manage.html" title="keystone-manage"
accesskey="P">previous</a> |</li>
<li><a href="index.html">keystone documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2012, OpenStack, LLC.
Last updated on Oct 21, 2014.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
</div>
</body>
</html>
|