
We support customization of scheduler's host manager, driver, and filters, but when we made the scheduler Pool aware we greatly limited this possibility because now instead of passing BackendState (previously called HostState) to the filters we are passing PoolState, which cannot be easily customized. Prior to this if you wanted to have a custom BackendState class you would just have to extend HostManager class and define the class attribute backend_state_cls before using it in config's scheduler_host_manager. Now it will not be enough with that because PoolState class is hardcoded in the BackendState's methods, so you'll have to actually copy all the code from that class just so you can replace the PoolState class instantiations. This patch fixes this by creating an instance attribute on initialization method, this way extending classes will just have to call parent's initialization and then replace the value of the pool_state_cls attribute. Due to a circular dependency between BackendState and PoolState (which inherits from BackendState) we cannot just add it as a class attribute, so we do it as an instance attribute instead. If we want to add it as a class attribute we would have to add after the PoolState class definition the following: BackendState.pool_state_cls = PoolState Conceptually that's closer to what we want (a class attribute) but the implementation is worse because you end up assigning the class attribute 270 lines away from where it should have been defined. TrivialFix Change-Id: I2c63806c4e9b1305742c7f07f47b95ba243c1666
Team and repository tags
CINDER
You have come across a storage service for an open cloud computing service. It has identified itself as Cinder. It was abstracted from the Nova project.
- Wiki: https://wiki.openstack.org/Cinder
- Developer docs: https://docs.openstack.org/developer/cinder
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
For developer information please see HACKING.rst
You can raise bugs here http://bugs.launchpad.net/cinder
Python client
https://git.openstack.org/cgit/openstack/python-cinderclient
Description
Languages
Python
99.7%
Smarty
0.3%