Fix the amphora no-op driver
The amphora no-op driver had the wrong method signature for the update_amphora_agent_config method. This patch corrects that issue. Change-Id: Ib1b0df3b7227d8a8dd68276e279cae1c4974ded2
This commit is contained in:
parent
926179c97d
commit
5defc1e8a4
@ -188,7 +188,7 @@ class AmphoraLoadBalancerDriver(object):
|
|||||||
Upload cert file to amphora for Controller Communication.
|
Upload cert file to amphora for Controller Communication.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def update_agent_config(self, amphora, agent_config):
|
def update_amphora_agent_config(self, amphora, agent_config):
|
||||||
"""Upload and update the amphora agent configuration.
|
"""Upload and update the amphora agent configuration.
|
||||||
|
|
||||||
:param amphora: amphora object, needs id and network ip(s)
|
:param amphora: amphora object, needs id and network ip(s)
|
||||||
|
@ -106,12 +106,12 @@ class NoopManager(object):
|
|||||||
self.amphoraconfig[amphora.id, pem_file] = (amphora.id, pem_file,
|
self.amphoraconfig[amphora.id, pem_file] = (amphora.id, pem_file,
|
||||||
'update_amp_cert_file')
|
'update_amp_cert_file')
|
||||||
|
|
||||||
def update_agent_config(self, amphora, agent_config):
|
def update_amphora_agent_config(self, amphora, agent_config):
|
||||||
LOG.debug("Amphora %s no-op, update agent config amphora "
|
LOG.debug("Amphora %s no-op, update agent config amphora "
|
||||||
"%s, with agent config %s",
|
"%s, with agent config %s",
|
||||||
self.__class__.__name__, amphora.id, agent_config)
|
self.__class__.__name__, amphora.id, agent_config)
|
||||||
self.amphoraconfig[amphora.id, agent_config] = (
|
self.amphoraconfig[amphora.id, agent_config] = (
|
||||||
amphora.id, agent_config, 'update_agent_config')
|
amphora.id, agent_config, 'update_amphora_agent_config')
|
||||||
|
|
||||||
|
|
||||||
class NoopAmphoraLoadBalancerDriver(
|
class NoopAmphoraLoadBalancerDriver(
|
||||||
@ -163,8 +163,8 @@ class NoopAmphoraLoadBalancerDriver(
|
|||||||
|
|
||||||
self.driver.upload_cert_amp(amphora, pem_file)
|
self.driver.upload_cert_amp(amphora, pem_file)
|
||||||
|
|
||||||
def update_agent_config(self, amphora, agent_config):
|
def update_amphora_agent_config(self, amphora, agent_config):
|
||||||
self.driver.update_agent_config(amphora, agent_config)
|
self.driver.update_amphora_agent_config(amphora, agent_config)
|
||||||
|
|
||||||
def update_vrrp_conf(self, loadbalancer):
|
def update_vrrp_conf(self, loadbalancer):
|
||||||
pass
|
pass
|
||||||
|
@ -145,8 +145,10 @@ class TestNoopAmphoraLoadBalancerDriver(base.TestCase):
|
|||||||
self.amphora.id, self.pem_file)])
|
self.amphora.id, self.pem_file)])
|
||||||
|
|
||||||
def test_update_agent_config(self):
|
def test_update_agent_config(self):
|
||||||
self.driver.update_agent_config(self.amphora, self.agent_config)
|
self.driver.update_amphora_agent_config(self.amphora,
|
||||||
|
self.agent_config)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
(self.amphora.id, self.agent_config, 'update_agent_config'),
|
(self.amphora.id, self.agent_config,
|
||||||
|
'update_amphora_agent_config'),
|
||||||
self.driver.driver.amphoraconfig[(
|
self.driver.driver.amphoraconfig[(
|
||||||
self.amphora.id, self.agent_config)])
|
self.amphora.id, self.agent_config)])
|
||||||
|
Loading…
Reference in New Issue
Block a user