Fixed --wait flag with l7rule create

Arguments were passed in the wrong order to l7rule_show after the
creation of the l7rule, displaying an invalid error message even when
the command succeeded.

Closes-Bug: #2120920
Change-Id: I880de9c23f4ec7a5664d598e28ebb31a1c8cfb8d
Signed-off-by: Gregory Thiemonge <gthiemon@redhat.com>
This commit is contained in:
Gregory Thiemonge
2025-08-19 09:33:41 +00:00
parent ddba32a8c0
commit 05f0aac118
3 changed files with 8 additions and 1 deletions

View File

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

View File

@@ -267,6 +267,8 @@ class TestL7RuleCreate(TestL7Rule):
sleep_time=mock.ANY,
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')
def test_l7rule_create_with_tag(self, mock_attrs):
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.