RETIRED, Part of OpenStack's Oslo project. New Oslo APIs go through an incubation phase in this repository before being released as part of a proper Python library.
Go to file
Jay Lau 4a47188ede Allow filters to only run once per request if their data is static
Currently the filter_all() method of each scheduler filter is run
once for each resource in a request, but for many filters the data
doesn't change during a request.

For example the data used by the AZ filter is pretty static, and
doesn't filter any more hosts on successive runs. However it is
fairly expensive to run on a large system.

Only filters that are based on data that may change within a
request, for example resource consumption, need to be evaluated
for each resource.

This patch adds a new attribute that allows filters to declare that
they only need to be run once per request. The default behavior is
left so that a filter is evaluated once for each resource in a
request.

Port from nova: Ia668f16414da86441323c58b1bbef5f88c81b90c

Change-Id: Ic656f1aa6830ed9b93c232a2098318e498a7d59e
Implements bp once-per-request-filters
2014-02-24 21:45:22 +08:00
doc/source Convert unicode strings for python3 portability 2013-05-07 11:55:56 -05:00
etc Remove rootwrap from incubator 2014-02-14 14:35:39 +01:00
openstack Allow filters to only run once per request if their data is static 2014-02-24 21:45:22 +08:00
pypi Rename Openstack to OpenStack 2014-02-13 16:05:04 +08:00
tests Allow filters to only run once per request if their data is static 2014-02-24 21:45:22 +08:00
tools Merge "Fix tools/graduate.sh for work with directories" 2014-02-21 01:01:57 +00:00
.coveragerc Update .coveragerc 2013-02-06 16:47:06 +02:00
.gitignore Add etc/openstack.conf.sample to .gitignore 2014-02-11 10:38:28 -07:00
.gitreview Correcting openstack-common mv to oslo-incubator. 2012-11-11 23:44:12 +00:00
.mailmap Update mailmap for Joe Gordon 2013-10-28 10:11:02 +00:00
.testr.conf Run tests in parallel as much as possible 2014-02-10 18:10:16 +00:00
HACKING.rst Update URL for global HACKING document 2013-11-11 10:36:08 -08:00
LICENSE Incorporating MIT licensed code 2013-12-02 11:57:19 +00:00
MAINTAINERS Update ChangBo's email 2014-02-19 21:38:25 +08:00
MANIFEST.in Don't include versioninfo in manifest. 2013-01-14 03:17:32 -08:00
README.rst The ability to run tests at various backend 2013-11-26 14:48:32 +02:00
requirements-py3.txt Add basic Python 3 tests 2014-02-06 20:56:04 +01:00
requirements.txt Merge "Fix requirements file ordering" 2014-02-20 17:58:44 +00:00
run_tests.sh Move ./run_tests.sh to Oslo 2013-08-13 18:06:11 +03:00
setup.cfg Remove rootwrap from incubator 2014-02-14 14:35:39 +01:00
setup.py Updated from global requirements 2013-12-10 07:23:28 -05:00
test-requirements-py3.txt Add basic Python 3 tests 2014-02-06 20:56:04 +01:00
test-requirements.txt Implements SI/IEC unit system conversion to bytes 2014-02-11 09:20:05 +09:00
TESTING.rst Creates a new file TESTING.rst. 2013-06-20 20:44:43 -04:00
tox.ini Merge "Update oslo log messages with translation domains" 2014-02-21 14:14:22 +00:00
update.py Merge "Copy the __init__.py from openstack.common" 2014-02-21 22:50:26 +00:00
update.sh Fix typo in update.py 2013-12-30 13:00:22 +08:00

The Oslo Incubator

The Oslo program produces a set of python libraries containing infrastructure code shared by OpenStack projects. The APIs provided by these libraries should be high quality, stable, consistent and generally useful.

The process of developing a new Oslo API usually begins by taking code which is common to some OpenStack projects and moving it into this repository. Incubation shouldn't be seen as a long term option for any API - it is merely a stepping stone to inclusion into a published Oslo library.

For more information, see our wiki page:

https://wiki.openstack.org/wiki/Oslo

Running Tests

To run tests in virtualenvs (preferred):

sudo pip install tox tox

To run tests in the current environment:

sudo pip install -r requirements.txt nosetests

To run tests using MySQL or PostgreSQL as a DB backend do:

OS_TEST_DBAPI_ADMIN_CONNECTION=mysql://user:password@host/database tox -e py27

Note, that your DB user must have permissions to create and drop databases.