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.

Conflicts:
	octavia/tests/unit/controller/worker/v2/flows/test_load_balancer_flows.py

Story 2010488
Task 47060

Change-Id: I98cce51a2536bcf204e5753ce4984af57e7e69e3
(cherry picked from commit d0a0f53dc3)
(cherry picked from commit 4e9203adb6)
(cherry picked from commit 66a62bc201)
(cherry picked from commit 7a7c81d32f)
This commit is contained in:
Gregory Thiemonge 2022-12-22 10:30:57 -05:00
parent b0379d6a84
commit 573990d600
5 changed files with 27 additions and 9 deletions

View File

@ -206,9 +206,16 @@ class LoadBalancerFlows(object):
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
)
)
flows.append(
network_tasks.GetAmphoraeNetworkConfigs(
requires=constants.LOADBALANCER_ID,
provides=constants.AMPHORAE_NETWORK_CONFIG
)
)
flows.append(
amphora_driver_tasks.AmphoraePostNetworkPlug(
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS)
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS,
constants.AMPHORAE_NETWORK_CONFIG)
)
)
flows.append(

View File

@ -200,9 +200,16 @@ class LoadBalancerFlows(object):
requires=constants.DELTAS, provides=constants.UPDATED_PORTS
)
)
flows.append(
network_tasks.GetAmphoraeNetworkConfigs(
requires=constants.LOADBALANCER_ID,
provides=constants.AMPHORAE_NETWORK_CONFIG
)
)
flows.append(
amphora_driver_tasks.AmphoraePostNetworkPlug(
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS)
requires=(constants.LOADBALANCER, constants.UPDATED_PORTS,
constants.AMPHORAE_NETWORK_CONFIG)
)
)
flows.append(

View File

@ -185,7 +185,6 @@ class TestLoadBalancerFlows(base.TestCase):
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
self.assertIn(constants.BUILD_TYPE_PRIORITY, 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.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.SERVER_PEM, 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(13, len(create_flow.provides))
self.assertEqual(6, len(create_flow.requires))
self.assertEqual(14, len(create_flow.provides))
def test_get_create_load_balancer_flows_active_standby_listeners(
self, mock_get_net_driver):

View File

@ -212,7 +212,6 @@ class TestLoadBalancerFlows(base.TestCase):
self.assertIn(constants.UPDATE_DICT, create_flow.requires)
self.assertIn(constants.BUILD_TYPE_PRIORITY, 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.SERVER_GROUP_ID, create_flow.requires)
@ -229,10 +228,10 @@ class TestLoadBalancerFlows(base.TestCase):
self.assertIn(constants.UPDATED_PORTS, create_flow.provides)
self.assertIn(constants.SERVER_PEM, create_flow.provides)
self.assertIn(constants.VIP, create_flow.provides)
self.assertIn(constants.AMPHORAE_NETWORK_CONFIG, create_flow.provides)
self.assertEqual(7, len(create_flow.requires))
self.assertEqual(13, len(create_flow.provides),
create_flow.provides)
self.assertEqual(6, len(create_flow.requires))
self.assertEqual(14, len(create_flow.provides))
def test_get_create_load_balancer_flows_active_standby_listeners(
self, mock_get_net_driver):

View File

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