From 9ec021386d2106d298650d343e3e916cf88a8086 Mon Sep 17 00:00:00 2001 From: "Javier M. Mellid" Date: Wed, 14 Dec 2016 19:38:09 +0100 Subject: [PATCH] Update DescribeQuotas API in Outscale driver DescribeQuota becomes DescribeQuotas with the new API update. Signed-off-by: Javier M. Mellid --- libcloud/compute/drivers/ec2.py | 6 +++--- .../fcu/{ex_describe_quota.xml => ex_describe_quotas.xml} | 4 ++-- libcloud/test/compute/test_ec2.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) rename libcloud/test/compute/fixtures/fcu/{ex_describe_quota.xml => ex_describe_quotas.xml} (97%) diff --git a/libcloud/compute/drivers/ec2.py b/libcloud/compute/drivers/ec2.py index e38dcf3296..e0cef11aca 100644 --- a/libcloud/compute/drivers/ec2.py +++ b/libcloud/compute/drivers/ec2.py @@ -6947,8 +6947,8 @@ def _to_quota(self, elem): return quota - def ex_describe_quota(self, dry_run=False, filters=None, - max_results=None, marker=None): + def ex_describe_quotas(self, dry_run=False, filters=None, + max_results=None, marker=None): """ Describes one or more of your quotas. @@ -6978,7 +6978,7 @@ def ex_describe_quota(self, dry_run=False, filters=None, raise NotImplementedError( 'quota marker is not implemented') - params = {'Action': 'DescribeQuota'} + params = {'Action': 'DescribeQuotas'} if dry_run: params.update({'DryRun': dry_run}) diff --git a/libcloud/test/compute/fixtures/fcu/ex_describe_quota.xml b/libcloud/test/compute/fixtures/fcu/ex_describe_quotas.xml similarity index 97% rename from libcloud/test/compute/fixtures/fcu/ex_describe_quota.xml rename to libcloud/test/compute/fixtures/fcu/ex_describe_quotas.xml index 294830299a..a3d2941f9b 100644 --- a/libcloud/test/compute/fixtures/fcu/ex_describe_quota.xml +++ b/libcloud/test/compute/fixtures/fcu/ex_describe_quotas.xml @@ -1,4 +1,4 @@ - 31ef7689-2521-445f-b634-2a5e3e66f699 true @@ -50,4 +50,4 @@ - + diff --git a/libcloud/test/compute/test_ec2.py b/libcloud/test/compute/test_ec2.py index 466c0df27d..790b6bf70c 100644 --- a/libcloud/test/compute/test_ec2.py +++ b/libcloud/test/compute/test_ec2.py @@ -1798,8 +1798,8 @@ def test_list_sizes(self): class FCUMockHttp(EC2MockHttp): fixtures = ComputeFileFixtures('fcu') - def _DescribeQuota(self, method, url, body, headers): - body = self.fixtures.load('ex_describe_quota.xml') + def _DescribeQuotas(self, method, url, body, headers): + body = self.fixtures.load('ex_describe_quotas.xml') return (httplib.OK, body, {}, httplib.responses[httplib.OK]) def _DescribeProductTypes(self, method, url, body, headers): @@ -1829,8 +1829,8 @@ def setUp(self): secret=EC2_PARAMS[1], host='some.fcucloud.com') - def test_ex_describe_quota(self): - is_truncated, quota = self.driver.ex_describe_quota() + def test_ex_describe_quotas(self): + is_truncated, quota = self.driver.ex_describe_quotas() self.assertTrue(is_truncated == 'true') self.assertTrue('global' in quota.keys()) self.assertTrue('vpc-00000000' in quota.keys())