diff --git a/octavia/amphorae/drivers/driver_base.py b/octavia/amphorae/drivers/driver_base.py index 3f27dfa5d1..72781c5379 100644 --- a/octavia/amphorae/drivers/driver_base.py +++ b/octavia/amphorae/drivers/driver_base.py @@ -55,13 +55,18 @@ class AmphoraLoadBalancerDriver(object): """ @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 @@ -69,13 +74,18 @@ class AmphoraLoadBalancerDriver(object): """ @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 diff --git a/octavia/amphorae/drivers/noop_driver/driver.py b/octavia/amphorae/drivers/noop_driver/driver.py index fc512e63eb..8dfa79a3e9 100644 --- a/octavia/amphorae/drivers/noop_driver/driver.py +++ b/octavia/amphorae/drivers/noop_driver/driver.py @@ -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') @@ -144,13 +146,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):