summaryrefslogtreecommitdiffstats
path: root/testcases/functest_utils.py
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-12-31 09:31:31 +0800
committermei mei <meimei@huawei.com>2016-01-04 01:52:13 +0000
commit3a65e3e4e78e00d9d46a0909b6713a726f9a9602 (patch)
treef2523b67896fbb9aa11d1eaed5a3181186948001 /testcases/functest_utils.py
parent91753df2c0b3e58bea62716a48e9a74bd9d43b45 (diff)
Update cinder volume quota for new tenant 'vIMS'
Change-Id: I26aad4f3989c89a62f66add85e0d88b7fd274425 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'testcases/functest_utils.py')
-rw-r--r--testcases/functest_utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/testcases/functest_utils.py b/testcases/functest_utils.py
index 88c00858e..fe0b3be74 100644
--- a/testcases/functest_utils.py
+++ b/testcases/functest_utils.py
@@ -321,6 +321,19 @@ def update_sg_quota(neutron_client, tenant_id, sg_quota, sg_rule_quota):
print "Error:", sys.exc_info()[0]
return False
+def update_cinder_quota(cinder_client, tenant_id, vols_quota, snapshots_quota,gigabytes_quota):
+ quotas_values = {
+ "volumes": vols_quota,
+ "snapshots": snapshots_quota,
+ "gigabytes": gigabytes_quota
+ }
+
+ try:
+ quotas_default=cinder_client.quotas.update(tenant_id,**quotas_values)
+ return True
+ except:
+ print "Error:", sys.exc_info()[0]
+ return False
def get_private_net(neutron_client):
# Checks if there is an existing private network