summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/network/v2
diff options
context:
space:
mode:
authorSindhu Devale <sindhu.devale@intel.com>2016-09-29 15:32:51 -0500
committerSindhu Devale <sindhu.devale@intel.com>2017-03-10 14:59:47 +0000
commit58591d3c37c0265d8775f881271ba4d987e5ffb6 (patch)
tree493ebc94d0f711e2dc1150a8ed28ba713c4612c2 /openstackclient/tests/unit/network/v2
parent35c308ebadc23929f96eb74ab59091b7e691f09e (diff)
downloadpython-openstackclient-58591d3c37c0265d8775f881271ba4d987e5ffb6.tar.gz
OSC Quota List
Implement Neutron feature of Quota List into OpenStack Client. Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57 Partially-Implements: blueprint neutron-client-quota
Diffstat (limited to 'openstackclient/tests/unit/network/v2')
-rw-r--r--openstackclient/tests/unit/network/v2/fakes.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/network/v2/fakes.py b/openstackclient/tests/unit/network/v2/fakes.py
index dcecbeee..d8756688 100644
--- a/openstackclient/tests/unit/network/v2/fakes.py
+++ b/openstackclient/tests/unit/network/v2/fakes.py
@@ -1494,3 +1494,53 @@ class FakeNetworkServiceProvider(object):
create_one_network_service_provider(
attrs))
return service_providers
+
+
+class FakeQuota(object):
+ """Fake quota"""
+
+ @staticmethod
+ def create_one_net_quota(attrs=None):
+ """Create one quota"""
+ attrs = attrs or {}
+
+ quota_attrs = {
+ 'floating_ips': 20,
+ 'networks': 25,
+ 'ports': 11,
+ 'rbac_policies': 15,
+ 'routers': 40,
+ 'security_groups': 10,
+ 'security_group_rules': 100,
+ 'subnets': 20,
+ 'subnet_pools': 30}
+
+ quota_attrs.update(attrs)
+
+ quota = fakes.FakeResource(
+ info=copy.deepcopy(quota_attrs),
+ loaded=True)
+ return quota
+
+ @staticmethod
+ def create_one_default_net_quota(attrs=None):
+ """Create one quota"""
+ attrs = attrs or {}
+
+ quota_attrs = {
+ 'floatingip': 30,
+ 'network': 20,
+ 'port': 10,
+ 'rbac_policy': 25,
+ 'router': 30,
+ 'security_group': 30,
+ 'security_group_rule': 200,
+ 'subnet': 10,
+ 'subnetpool': 20}
+
+ quota_attrs.update(attrs)
+
+ quota = fakes.FakeResource(
+ info=copy.deepcopy(quota_attrs),
+ loaded=True)
+ return quota