Merge "Fix missing params in amphora base and noop driver" into stable/train

This commit is contained in:
Zuul 2020-07-19 19:47:51 +00:00 committed by Gerrit Code Review
commit 22c933afe7
2 changed files with 24 additions and 12 deletions

View File

@ -55,13 +55,18 @@ class AmphoraLoadBalancerDriver(object):
""" """
@abc.abstractmethod @abc.abstractmethod
def start(self, loadbalancer, amphora): def start(self, loadbalancer, amphora, timeout_dict=None):
"""Start the listeners on the amphora. """Start the listeners on the amphora.
:param loadbalancer: loadbalancer object to start listeners :param loadbalancer: loadbalancer object to start listeners
:type loadbalancer: octavia.db.models.LoadBalancer :type loadbalancer: octavia.db.models.LoadBalancer
:param amphora: Amphora to start. If None, start on all amphora :param amphora: Amphora to start. If None, start on all amphora
:type amphora: octavia.db.models.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) :returns: return a value list (listener, vip, status flag--enable)
At this moment, we just build the basic structure for testing, will At this moment, we just build the basic structure for testing, will
@ -69,13 +74,18 @@ class AmphoraLoadBalancerDriver(object):
""" """
@abc.abstractmethod @abc.abstractmethod
def reload(self, loadbalancer, amphora): def reload(self, loadbalancer, amphora, timeout_dict=None):
"""Reload the listeners on the amphora. """Reload the listeners on the amphora.
:param loadbalancer: loadbalancer object to reload listeners :param loadbalancer: loadbalancer object to reload listeners
:type loadbalancer: octavia.db.models.LoadBalancer :type loadbalancer: octavia.db.models.LoadBalancer
:param amphora: Amphora to start. If None, reload on all amphora :param amphora: Amphora to start. If None, reload on all amphora
:type amphora: octavia.db.models.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) :returns: return a value list (listener, vip, status flag--enable)
At this moment, we just build the basic structure for testing, will At this moment, we just build the basic structure for testing, will

View File

@ -57,16 +57,18 @@ class NoopManager(object):
loadbalancer.vip, loadbalancer.vip,
'active') 'active')
def start(self, loadbalancer, amphora=None): def start(self, loadbalancer, amphora=None, timeout_dict=None):
LOG.debug("Amphora %s no-op, start listeners, lb %s, amp %s", LOG.debug("Amphora %s no-op, start listeners, lb %s, amp %s"
self.__class__.__name__, loadbalancer.id, amphora) "timeouts %s", self.__class__.__name__, loadbalancer.id,
amphora, timeout_dict)
self.amphoraconfig[ self.amphoraconfig[
(loadbalancer.id, amphora.id)] = (loadbalancer, amphora, (loadbalancer.id, amphora.id)] = (loadbalancer, amphora,
'start') 'start')
def reload(self, loadbalancer, amphora=None): def reload(self, loadbalancer, amphora=None, timeout_dict=None):
LOG.debug("Amphora %s no-op, reload listeners, lb %s, amp %s", LOG.debug("Amphora %s no-op, reload listeners, lb %s, amp %s, "
self.__class__.__name__, loadbalancer.id, amphora) "timeouts %s", self.__class__.__name__, loadbalancer.id,
amphora, timeout_dict)
self.amphoraconfig[ self.amphoraconfig[
(loadbalancer.id, amphora.id)] = (loadbalancer, amphora, (loadbalancer.id, amphora.id)] = (loadbalancer, amphora,
'reload') 'reload')
@ -144,13 +146,13 @@ class NoopAmphoraLoadBalancerDriver(
self.driver.update(loadbalancer) 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): def delete(self, listener):