diff options
| author | Matthew Sherborne <msherborne@gmail.com> | 2013-05-03 10:29:45 +1000 |
|---|---|---|
| committer | Matthew Sherborne <msherborne@gmail.com> | 2013-05-10 22:10:49 +1000 |
| commit | 1f2aba5f706f882663e770bc8dac031627c91f39 (patch) | |
| tree | fb0781f5c478bb80e30cf1f1485733462b1ca831 /openstack/common/scheduler/weights | |
| parent | 6a4800d8cc36812835dca796895bafec940b2ce5 (diff) | |
| download | oslo-1f2aba5f706f882663e770bc8dac031627c91f39.tar.gz oslo-1f2aba5f706f882663e770bc8dac031627c91f39.tar.xz oslo-1f2aba5f706f882663e770bc8dac031627c91f39.zip | |
Renames filter to base_filter and weight to base_weight
filter is a python builtin function so importing it pollutes ones name
space.
It is now renamed to base_filter.
We also rename weight to base_weight, just to be consistent in the
naming conventions.
We add a test for base_filter.
Fixes bug 1175829
Change-Id: I46e0fa696d2f39081b5568c701b0a70c54f271ab
Diffstat (limited to 'openstack/common/scheduler/weights')
| -rw-r--r-- | openstack/common/scheduler/weights/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openstack/common/scheduler/weights/__init__.py b/openstack/common/scheduler/weights/__init__.py index c05c04e..e2eb04a 100644 --- a/openstack/common/scheduler/weights/__init__.py +++ b/openstack/common/scheduler/weights/__init__.py @@ -18,10 +18,10 @@ Scheduler host weights """ -from openstack.common.scheduler import weight +from openstack.common.scheduler import base_weight -class WeighedHost(weight.WeighedObject): +class WeighedHost(base_weight.WeighedObject): def to_dict(self): return { 'weight': self.weight, @@ -33,12 +33,12 @@ class WeighedHost(weight.WeighedObject): (self.obj.host, self.weight)) -class BaseHostWeigher(weight.BaseWeigher): +class BaseHostWeigher(base_weight.BaseWeigher): """Base class for host weights.""" pass -class HostWeightHandler(weight.BaseWeightHandler): +class HostWeightHandler(base_weight.BaseWeightHandler): object_class = WeighedHost def __init__(self, namespace): |
