Merge "Fix the amphora no-op driver"

This commit is contained in:
Zuul 2019-09-19 00:17:24 +00:00 committed by Gerrit Code Review
commit a498823789
3 changed files with 9 additions and 7 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)])