Fix missing params in amphora base and noop driver
Running amphora failover against the amphora noop driver was raising a TypeError (reload() takes from 2 to 3 positional arguments but 4 were given). Change-Id: I64172d6995959cf377364584ad9a2395f9ec0605
This commit is contained in:
parent
89123c0fc1
commit
41c628a084
@ -51,13 +51,18 @@ class AmphoraLoadBalancerDriver(object, metaclass=abc.ABCMeta):
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def start(self, loadbalancer, amphora):
|
||||
def start(self, loadbalancer, amphora, timeout_dict=None):
|
||||
"""Start the listeners on the amphora.
|
||||
|
||||
:param loadbalancer: loadbalancer object to start listeners
|
||||
:type loadbalancer: octavia.db.models.LoadBalancer
|
||||
:param amphora: Amphora to start. If None, start on all amphora
|
||||
:type amphora: octavia.db.models.Amphora
|
||||
:param timeout_dict: Dictionary of timeout values for calls to the
|
||||
amphora. May contain: req_conn_timeout,
|
||||
req_read_timeout, conn_max_retries,
|
||||
conn_retry_interval
|
||||
:type timeout_dict: dict
|
||||
:returns: return a value list (listener, vip, status flag--enable)
|
||||
|
||||
At this moment, we just build the basic structure for testing, will
|
||||
@ -65,13 +70,18 @@ class AmphoraLoadBalancerDriver(object, metaclass=abc.ABCMeta):
|
||||
"""
|
||||
|
||||
@abc.abstractmethod
|
||||
def reload(self, loadbalancer, amphora):
|
||||
def reload(self, loadbalancer, amphora, timeout_dict=None):
|
||||
"""Reload the listeners on the amphora.
|
||||
|
||||
:param loadbalancer: loadbalancer object to reload listeners
|
||||
:type loadbalancer: octavia.db.models.LoadBalancer
|
||||
:param amphora: Amphora to start. If None, reload on all amphora
|
||||
:type amphora: octavia.db.models.Amphora
|
||||
:param timeout_dict: Dictionary of timeout values for calls to the
|
||||
amphora. May contain: req_conn_timeout,
|
||||
req_read_timeout, conn_max_retries,
|
||||
conn_retry_interval
|
||||
:type timeout_dict: dict
|
||||
:returns: return a value list (listener, vip, status flag--enable)
|
||||
|
||||
At this moment, we just build the basic structure for testing, will
|
||||
|
@ -57,16 +57,18 @@ class NoopManager(object):
|
||||
loadbalancer.vip,
|
||||
'active')
|
||||
|
||||
def start(self, loadbalancer, amphora=None):
|
||||
LOG.debug("Amphora %s no-op, start listeners, lb %s, amp %s",
|
||||
self.__class__.__name__, loadbalancer.id, amphora)
|
||||
def start(self, loadbalancer, amphora=None, timeout_dict=None):
|
||||
LOG.debug("Amphora %s no-op, start listeners, lb %s, amp %s"
|
||||
"timeouts %s", self.__class__.__name__, loadbalancer.id,
|
||||
amphora, timeout_dict)
|
||||
self.amphoraconfig[
|
||||
(loadbalancer.id, amphora.id)] = (loadbalancer, amphora,
|
||||
'start')
|
||||
|
||||
def reload(self, loadbalancer, amphora=None):
|
||||
LOG.debug("Amphora %s no-op, reload listeners, lb %s, amp %s",
|
||||
self.__class__.__name__, loadbalancer.id, amphora)
|
||||
def reload(self, loadbalancer, amphora=None, timeout_dict=None):
|
||||
LOG.debug("Amphora %s no-op, reload listeners, lb %s, amp %s, "
|
||||
"timeouts %s", self.__class__.__name__, loadbalancer.id,
|
||||
amphora, timeout_dict)
|
||||
self.amphoraconfig[
|
||||
(loadbalancer.id, amphora.id)] = (loadbalancer, amphora,
|
||||
'reload')
|
||||
@ -145,13 +147,13 @@ class NoopAmphoraLoadBalancerDriver(
|
||||
|
||||
self.driver.update(loadbalancer)
|
||||
|
||||
def start(self, loadbalancer, amphora=None):
|
||||
def start(self, loadbalancer, amphora=None, timeout_dict=None):
|
||||
|
||||
self.driver.start(loadbalancer, amphora)
|
||||
self.driver.start(loadbalancer, amphora, timeout_dict)
|
||||
|
||||
def reload(self, loadbalancer, amphora=None):
|
||||
def reload(self, loadbalancer, amphora=None, timeout_dict=None):
|
||||
|
||||
self.driver.reload(loadbalancer, amphora)
|
||||
self.driver.reload(loadbalancer, amphora, timeout_dict)
|
||||
|
||||
def delete(self, listener):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user