Gorka Eguileor 46e1190e6b Fix scheduler_host_manager limitation
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
2017-07-03 12:22:56 +02:00
2016-07-26 11:09:05 -05:00
2012-05-03 10:48:26 -07:00
2012-05-03 10:48:26 -07:00
2017-04-08 15:03:44 +08:00
2017-06-22 02:17:54 +00:00
2012-05-03 10:48:26 -07:00
2015-06-11 17:19:19 +02:00
2017-04-08 15:03:44 +08:00
2017-03-02 23:53:29 +00:00
2017-06-22 02:17:54 +00:00

Team and repository tags

image

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.

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://git.openstack.org/openstack/cinder.git

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
OpenStack Block Storage (Cinder)
Readme 913 MiB
Languages
Python 99.7%
Smarty 0.3%