From d875cb34b94c9efe9767cc5ccd89e462bc0e7614 Mon Sep 17 00:00:00 2001 From: SongmingYan Date: Wed, 8 Jun 2016 04:19:39 -0400 Subject: [PATCH] Fix the problem of "qos-bandwidth-limit-rule-show" Add a arg "**_params" in show_bandwidth_limit_rule() to use the "-F" option. Change-Id: I1bee877a2e83801527bcccffe404053b6aafe012 Partial-Bug: #1587291 --- .../tests/unit/qos/test_cli20_bandwidth_limit_rule.py | 4 ++-- neutronclient/v2_0/client.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/neutronclient/tests/unit/qos/test_cli20_bandwidth_limit_rule.py b/neutronclient/tests/unit/qos/test_cli20_bandwidth_limit_rule.py index d1b39c76d..8d4380a81 100644 --- a/neutronclient/tests/unit/qos/test_cli20_bandwidth_limit_rule.py +++ b/neutronclient/tests/unit/qos/test_cli20_bandwidth_limit_rule.py @@ -131,7 +131,7 @@ class CLITestV20QoSBandwidthLimitRuleJSON(test_cli20.CLITestV20Base): cmd = bw_rule.ShowQoSBandwidthLimitRule(test_cli20.MyApp(sys.stdout), None) policy_id = 'policy_id' - args = [self.test_id, policy_id] + args = ['--fields', 'id', self.test_id, policy_id] self._test_show_resource(self.res, cmd, self.test_id, args, - [], cmd_resource=self.cmd_res, + ['id'], cmd_resource=self.cmd_res, parent_id=policy_id) diff --git a/neutronclient/v2_0/client.py b/neutronclient/v2_0/client.py index 3b6a5900e..2b3e59810 100644 --- a/neutronclient/v2_0/client.py +++ b/neutronclient/v2_0/client.py @@ -1693,10 +1693,10 @@ class Client(ClientBase): self.qos_bandwidth_limit_rules_path % policy_id, retrieve_all, **_params) - def show_bandwidth_limit_rule(self, rule, policy, body=None): + def show_bandwidth_limit_rule(self, rule, policy, **_params): """Fetches information of a certain bandwidth limit rule.""" return self.get(self.qos_bandwidth_limit_rule_path % - (policy, rule), body=body) + (policy, rule), params=_params) def create_bandwidth_limit_rule(self, policy, body=None): """Creates a new bandwidth limit rule."""