Merge "Adding post_network_plug to the noop amphora driver"

This commit is contained in:
Jenkins 2015-04-08 21:07:04 +00:00 committed by Gerrit Code Review
commit 39d20059ca
2 changed files with 15 additions and 0 deletions

View File

@ -80,6 +80,11 @@ class NoopManager(object):
self.__class__.__name__, amphora.id)
self.amphoraconfig[amphora.id] = (amphora.id, 'finalize amphora')
def post_network_plug(self, amphora):
LOG.debug("Amphora %s no-op, post network plug amphora %s",
self.__class__.__name__, amphora.id)
self.amphoraconfig[amphora.id] = (amphora.id, 'post_network_plug')
class NoopAmphoraLoadBalancerDriver(driver_base.AmphoraLoadBalancerDriver):
def __init__(self, log):
@ -118,3 +123,7 @@ class NoopAmphoraLoadBalancerDriver(driver_base.AmphoraLoadBalancerDriver):
def finalize_amphora(self, amphora):
self.driver.finalize_amphora(amphora)
def post_network_plug(self, amphora):
self.driver.post_network_plug(amphora)

View File

@ -99,3 +99,9 @@ class NoopAmphoraLoadBalancerDriver(base.TestCase):
self.assertEqual((self.amphora.id, 'finalize amphora'),
self.driver.driver.amphoraconfig[
self.amphora.id])
def test_post_network_plug(self):
self.driver.post_network_plug(self.amphora)
self.assertEqual((self.amphora.id, 'post_network_plug'),
self.driver.driver.amphoraconfig[
self.amphora.id])