Merge "Fixed --wait flag with l7rule create"

This commit is contained in:
Zuul
2025-08-27 12:19:18 +00:00
committed by Gerrit Code Review
3 changed files with 8 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ class CreateL7Rule(command.ShowOne):
data = { data = {
'rule': ( 'rule': (
self.app.client_manager.load_balancer.l7rule_show( self.app.client_manager.load_balancer.l7rule_show(
l7policy_id, data['rule']['id'])) data['rule']['id'], l7policy_id))
} }
formatters = {'tags': v2_utils.FlatListColumn} formatters = {'tags': v2_utils.FlatListColumn}

View File

@@ -267,6 +267,8 @@ class TestL7RuleCreate(TestL7Rule):
sleep_time=mock.ANY, sleep_time=mock.ANY,
status_field='provisioning_status') status_field='provisioning_status')
self.api_mock.l7rule_show.assert_called_with(mock.ANY, self._l7po.id)
@mock.patch('octaviaclient.osc.v2.utils.get_l7rule_attrs') @mock.patch('octaviaclient.osc.v2.utils.get_l7rule_attrs')
def test_l7rule_create_with_tag(self, mock_attrs): def test_l7rule_create_with_tag(self, mock_attrs):
mock_attrs.return_value = { mock_attrs.return_value = {

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fixed a bug when using the ``--wait`` flag with the ``l7rule create``
command, it displayed an error message even when the command succeeded.