From ad2c3009aed4334a0752679bf984f6c9cea49171 Mon Sep 17 00:00:00 2001 From: zahlabut Date: Sun, 5 Sep 2021 16:00:38 +0300 Subject: [PATCH] Expected success status for "QoS rule update APIs" is "200 OK" Fix for: https://bugs.launchpad.net/neutron/+bug/1942448 Change-Id: I1e798badceb7fbda499bfeb34c98dea0e73c24bf --- .../lib/services/network/qos_limit_bandwidth_rules_client.py | 2 +- .../lib/services/network/qos_minimum_bandwidth_rules_client.py | 2 +- .../services/network/test_qos_limit_bandwidth_rules_client.py | 2 +- .../services/network/test_qos_minimum_bandwidth_rules_client.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tempest/lib/services/network/qos_limit_bandwidth_rules_client.py b/tempest/lib/services/network/qos_limit_bandwidth_rules_client.py index 8ca3c68bdd..8fd87fe665 100644 --- a/tempest/lib/services/network/qos_limit_bandwidth_rules_client.py +++ b/tempest/lib/services/network/qos_limit_bandwidth_rules_client.py @@ -39,7 +39,7 @@ class QosLimitBandwidthRulesClient(base.BaseNetworkClient): uri = '/qos/policies/{}/bandwidth_limit_rules/{}'.format( qos_policy_id, rule_id) post_data = {'bandwidth_limit_rule': kwargs} - return self.update_resource(uri, post_data, expect_response_code=202) + return self.update_resource(uri, post_data) def show_limit_bandwidth_rule(self, qos_policy_id, rule_id, **fields): """Show details of a limit bandwidth rule. diff --git a/tempest/lib/services/network/qos_minimum_bandwidth_rules_client.py b/tempest/lib/services/network/qos_minimum_bandwidth_rules_client.py index e512acafb4..dd9f45f22a 100644 --- a/tempest/lib/services/network/qos_minimum_bandwidth_rules_client.py +++ b/tempest/lib/services/network/qos_minimum_bandwidth_rules_client.py @@ -38,7 +38,7 @@ class QosMinimumBandwidthRulesClient(base.BaseNetworkClient): uri = '/qos/policies/%s/minimum_bandwidth_rules/%s' % ( qos_policy_id, rule_id) post_data = {'minimum_bandwidth_rule': kwargs} - return self.update_resource(uri, post_data, expect_response_code=202) + return self.update_resource(uri, post_data) def show_minimum_bandwidth_rule(self, qos_policy_id, rule_id, **fields): """Show details of a minimum bandwidth rule. diff --git a/tempest/tests/lib/services/network/test_qos_limit_bandwidth_rules_client.py b/tempest/tests/lib/services/network/test_qos_limit_bandwidth_rules_client.py index b03896867f..e83792de77 100644 --- a/tempest/tests/lib/services/network/test_qos_limit_bandwidth_rules_client.py +++ b/tempest/tests/lib/services/network/test_qos_limit_bandwidth_rules_client.py @@ -85,7 +85,7 @@ class TestQosLimitBandwidthRulesClient(base.BaseServiceTest): "tempest.lib.common.rest_client.RestClient.put", resp_body, bytes_body, - 202, + 200, qos_policy_id=self.FAKE_QOS_POLICY_ID, rule_id=self.FAKE_MAX_BW_RULE_ID, **update_kwargs) diff --git a/tempest/tests/lib/services/network/test_qos_minimum_bandwidth_rules_client.py b/tempest/tests/lib/services/network/test_qos_minimum_bandwidth_rules_client.py index 7187ffa276..8234ddac20 100644 --- a/tempest/tests/lib/services/network/test_qos_minimum_bandwidth_rules_client.py +++ b/tempest/tests/lib/services/network/test_qos_minimum_bandwidth_rules_client.py @@ -98,7 +98,7 @@ class TestQosMinimumBandwidthRulesClient(base.BaseServiceTest): "tempest.lib.common.rest_client.RestClient.put", resp_body, bytes_body, - 202, + 200, qos_policy_id=self.FAKE_QOS_POLICY_ID, rule_id=self.FAKE_MIN_BW_RULE_ID, **update_kwargs)