From d3e9361796b4395fc86ea85adb5c9df20cd555d2 Mon Sep 17 00:00:00 2001 From: Reedip <reedip.banerjee@nectechnologies.in> Date: Fri, 16 Sep 2016 12:46:45 +0530 Subject: [PATCH] Fix Quota Support for HMs Health Monitors could not be updated using the `openstack quota update` CLI. This patch fixes the same. Change-Id: Ic5a4fa5dce5767e40139137131114834d564f89a Closes-Bug: #1624225 --- openstackclient/common/quota.py | 2 +- openstackclient/tests/unit/common/test_quota.py | 6 +++--- openstackclient/tests/unit/network/v2/fakes.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index aabfa5d54b..4668e193e7 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -75,7 +75,7 @@ NETWORK_QUOTAS = { 'vip': 'vips', 'subnetpool': 'subnetpools', 'member': 'members', - 'health_monitor': 'health-monitors', + 'healthmonitor': 'health-monitors', } diff --git a/openstackclient/tests/unit/common/test_quota.py b/openstackclient/tests/unit/common/test_quota.py index ac03cb6048..c43755bd05 100644 --- a/openstackclient/tests/unit/common/test_quota.py +++ b/openstackclient/tests/unit/common/test_quota.py @@ -250,7 +250,7 @@ class TestQuotaSet(TestQuota): '--ports', str(network_fakes.QUOTA['port']), '--vips', str(network_fakes.QUOTA['vip']), '--members', str(network_fakes.QUOTA['member']), - '--health-monitors', str(network_fakes.QUOTA['health_monitor']), + '--health-monitors', str(network_fakes.QUOTA['healthmonitor']), identity_fakes.project_name, ] verifylist = [ @@ -266,7 +266,7 @@ class TestQuotaSet(TestQuota): ('port', network_fakes.QUOTA['port']), ('vip', network_fakes.QUOTA['vip']), ('member', network_fakes.QUOTA['member']), - ('health_monitor', network_fakes.QUOTA['health_monitor']), + ('healthmonitor', network_fakes.QUOTA['healthmonitor']), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) @@ -284,7 +284,7 @@ class TestQuotaSet(TestQuota): 'port': network_fakes.QUOTA['port'], 'vip': network_fakes.QUOTA['vip'], 'member': network_fakes.QUOTA['member'], - 'health_monitor': network_fakes.QUOTA['health_monitor'], + 'healthmonitor': network_fakes.QUOTA['healthmonitor'], } self.network_mock.update_quota.assert_called_once_with( identity_fakes.project_id, diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py index e3adb435cb..ec032c929d 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -33,7 +33,7 @@ QUOTA = { "port": 50, "vip": 10, "member": 10, - "health_monitor": 10, + "healthmonitor": 10, }