Merge "Adding post_network_plug to the noop amphora driver"
This commit is contained in:
commit
39d20059ca
@ -80,6 +80,11 @@ class NoopManager(object):
|
|||||||
self.__class__.__name__, amphora.id)
|
self.__class__.__name__, amphora.id)
|
||||||
self.amphoraconfig[amphora.id] = (amphora.id, 'finalize amphora')
|
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):
|
class NoopAmphoraLoadBalancerDriver(driver_base.AmphoraLoadBalancerDriver):
|
||||||
def __init__(self, log):
|
def __init__(self, log):
|
||||||
@ -118,3 +123,7 @@ class NoopAmphoraLoadBalancerDriver(driver_base.AmphoraLoadBalancerDriver):
|
|||||||
def finalize_amphora(self, amphora):
|
def finalize_amphora(self, amphora):
|
||||||
|
|
||||||
self.driver.finalize_amphora(amphora)
|
self.driver.finalize_amphora(amphora)
|
||||||
|
|
||||||
|
def post_network_plug(self, amphora):
|
||||||
|
|
||||||
|
self.driver.post_network_plug(amphora)
|
||||||
|
@ -99,3 +99,9 @@ class NoopAmphoraLoadBalancerDriver(base.TestCase):
|
|||||||
self.assertEqual((self.amphora.id, 'finalize amphora'),
|
self.assertEqual((self.amphora.id, 'finalize amphora'),
|
||||||
self.driver.driver.amphoraconfig[
|
self.driver.driver.amphoraconfig[
|
||||||
self.amphora.id])
|
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])
|
||||||
|
Loading…
Reference in New Issue
Block a user