Fix listener creation with fully-populated API
Creating a listener with the fully-populated API was broken in SINGLE topology, one required parameter was missing from the flow. Story 2010488 Task 47060 Change-Id: I98cce51a2536bcf204e5753ce4984af57e7e69e3
This commit is contained in:
parent
ac3618b140
commit
d0a0f53dc3
@ -205,9 +205,16 @@ class LoadBalancerFlows(object):
|
|||||||
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
|
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
flows.append(
|
||||||
|
network_tasks.GetAmphoraeNetworkConfigs(
|
||||||
|
requires=constants.LOADBALANCER_ID,
|
||||||
|
provides=constants.AMPHORAE_NETWORK_CONFIG
|
||||||
|
)
|
||||||
|
)
|
||||||
flows.append(
|
flows.append(
|
||||||
amphora_driver_tasks.AmphoraePostNetworkPlug(
|
amphora_driver_tasks.AmphoraePostNetworkPlug(
|
||||||
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS)
|
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS,
|
||||||
|
constants.AMPHORAE_NETWORK_CONFIG)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
flows.append(
|
flows.append(
|
||||||
|
@ -210,9 +210,16 @@ class LoadBalancerFlows(object):
|
|||||||
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
|
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
flows.append(
|
||||||
|
network_tasks.GetAmphoraeNetworkConfigs(
|
||||||
|
requires=constants.LOADBALANCER_ID,
|
||||||
|
provides=constants.AMPHORAE_NETWORK_CONFIG
|
||||||
|
)
|
||||||
|
)
|
||||||
flows.append(
|
flows.append(
|
||||||
amphora_driver_tasks.AmphoraePostNetworkPlug(
|
amphora_driver_tasks.AmphoraePostNetworkPlug(
|
||||||
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS)
|
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS,
|
||||||
|
constants.AMPHORAE_NETWORK_CONFIG)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
flows.append(
|
flows.append(
|
||||||
|
@ -185,7 +185,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
|||||||
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
|
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
|
||||||
self.assertIn(constants.BUILD_TYPE_PRIORITY, create_flow.requires)
|
self.assertIn(constants.BUILD_TYPE_PRIORITY, create_flow.requires)
|
||||||
self.assertIn(constants.FLAVOR, create_flow.requires)
|
self.assertIn(constants.FLAVOR, create_flow.requires)
|
||||||
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG, create_flow.requires)
|
|
||||||
self.assertIn(constants.AVAILABILITY_ZONE, create_flow.requires)
|
self.assertIn(constants.AVAILABILITY_ZONE, create_flow.requires)
|
||||||
self.assertIn(constants.SERVER_GROUP_ID, create_flow.requires)
|
self.assertIn(constants.SERVER_GROUP_ID, create_flow.requires)
|
||||||
|
|
||||||
@ -202,9 +201,10 @@ class TestLoadBalancerFlows(base.TestCase):
|
|||||||
self.assertIn(constants.AMP_DATA, create_flow.provides)
|
self.assertIn(constants.AMP_DATA, create_flow.provides)
|
||||||
self.assertIn(constants.SERVER_PEM, create_flow.provides)
|
self.assertIn(constants.SERVER_PEM, create_flow.provides)
|
||||||
self.assertIn(constants.AMPHORA_NETWORK_CONFIG, create_flow.provides)
|
self.assertIn(constants.AMPHORA_NETWORK_CONFIG, create_flow.provides)
|
||||||
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG, create_flow.provides)
|
||||||
|
|
||||||
self.assertEqual(7, len(create_flow.requires))
|
self.assertEqual(6, len(create_flow.requires))
|
||||||
self.assertEqual(13, len(create_flow.provides))
|
self.assertEqual(14, len(create_flow.provides))
|
||||||
|
|
||||||
def test_get_create_load_balancer_flows_active_standby_listeners(
|
def test_get_create_load_balancer_flows_active_standby_listeners(
|
||||||
self, mock_get_net_driver):
|
self, mock_get_net_driver):
|
||||||
|
@ -239,7 +239,6 @@ class TestLoadBalancerFlows(base.TestCase):
|
|||||||
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
|
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
|
||||||
self.assertIn(constants.BUILD_TYPE_PRIORITY, create_flow.requires)
|
self.assertIn(constants.BUILD_TYPE_PRIORITY, create_flow.requires)
|
||||||
self.assertIn(constants.FLAVOR, create_flow.requires)
|
self.assertIn(constants.FLAVOR, create_flow.requires)
|
||||||
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG, create_flow.requires)
|
|
||||||
self.assertIn(constants.AVAILABILITY_ZONE, create_flow.requires)
|
self.assertIn(constants.AVAILABILITY_ZONE, create_flow.requires)
|
||||||
self.assertIn(constants.SERVER_GROUP_ID, create_flow.requires)
|
self.assertIn(constants.SERVER_GROUP_ID, create_flow.requires)
|
||||||
|
|
||||||
@ -257,9 +256,10 @@ class TestLoadBalancerFlows(base.TestCase):
|
|||||||
self.assertIn(constants.SERVER_PEM, create_flow.provides)
|
self.assertIn(constants.SERVER_PEM, create_flow.provides)
|
||||||
self.assertIn(constants.VIP, create_flow.provides)
|
self.assertIn(constants.VIP, create_flow.provides)
|
||||||
self.assertIn(constants.ADDITIONAL_VIPS, create_flow.provides)
|
self.assertIn(constants.ADDITIONAL_VIPS, create_flow.provides)
|
||||||
|
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG, create_flow.provides)
|
||||||
|
|
||||||
self.assertEqual(7, len(create_flow.requires))
|
self.assertEqual(6, len(create_flow.requires))
|
||||||
self.assertEqual(14, len(create_flow.provides))
|
self.assertEqual(15, len(create_flow.provides))
|
||||||
|
|
||||||
@mock.patch('octavia.common.rpc.NOTIFIER',
|
@mock.patch('octavia.common.rpc.NOTIFIER',
|
||||||
new_callable=MockNOTIFIER)
|
new_callable=MockNOTIFIER)
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixed a bug that prevented Octavia from creating listeners with the
|
||||||
|
fully-populated load balancer API in SINGLE topology mode.
|
Loading…
Reference in New Issue
Block a user