4a47188ede
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 |
||
---|---|---|
doc/source | ||
etc | ||
openstack | ||
pypi | ||
tests | ||
tools | ||
.coveragerc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.testr.conf | ||
HACKING.rst | ||
LICENSE | ||
MAINTAINERS | ||
MANIFEST.in | ||
README.rst | ||
requirements-py3.txt | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements-py3.txt | ||
test-requirements.txt | ||
TESTING.rst | ||
tox.ini | ||
update.py | ||
update.sh |
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:
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.