Add fix for __init__() error
This patch set fixes __init__() got multiple values for keyword argument osc error. Closes-Bug: #1587824 Change-Id: Ieaa1250774ec0fdab5450fe9c3962bb3d1f4136b
This commit is contained in:
@@ -68,12 +68,12 @@ class WorkloadBalance(base.BaseStrategy):
|
|||||||
|
|
||||||
MIGRATION = "migrate"
|
MIGRATION = "migrate"
|
||||||
|
|
||||||
def __init__(self, osc=None):
|
def __init__(self, config=None, osc=None):
|
||||||
"""Using live migration
|
"""Using live migration
|
||||||
|
|
||||||
:param osc: an OpenStackClients object
|
:param osc: an OpenStackClients object
|
||||||
"""
|
"""
|
||||||
super(WorkloadBalance, self).__init__(osc)
|
super(WorkloadBalance, self).__init__(config, osc)
|
||||||
# the migration plan will be triggered when the CPU utlization %
|
# the migration plan will be triggered when the CPU utlization %
|
||||||
# reaches threshold
|
# reaches threshold
|
||||||
# TODO(Junjie): Threshold should be configurable for each audit
|
# TODO(Junjie): Threshold should be configurable for each audit
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ class WorkloadStabilization(base.WorkloadStabilizationBaseStrategy):
|
|||||||
MIGRATION = "migrate"
|
MIGRATION = "migrate"
|
||||||
MEMOIZE = _set_memoize(CONF)
|
MEMOIZE = _set_memoize(CONF)
|
||||||
|
|
||||||
def __init__(self, osc=None):
|
def __init__(self, config=None, osc=None):
|
||||||
super(WorkloadStabilization, self).__init__(osc)
|
super(WorkloadStabilization, self).__init__(config, osc)
|
||||||
self._ceilometer = None
|
self._ceilometer = None
|
||||||
self._nova = None
|
self._nova = None
|
||||||
self.weights = CONF['watcher_strategies.workload_stabilization']\
|
self.weights = CONF['watcher_strategies.workload_stabilization']\
|
||||||
|
|||||||
Reference in New Issue
Block a user