diff options
| author | Jenkins <jenkins@review.openstack.org> | 2017-03-21 03:56:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2017-03-21 03:56:05 +0000 |
| commit | 6329c04297f7f08159eb1e9a0e3c089e188397af (patch) | |
| tree | 42fbddf3f11d91bceea43de5a66f249d95acdfc8 /openstackclient/tests/unit/network | |
| parent | efc570dae223a46de4a77d0ed03648998ca37eab (diff) | |
| parent | 58591d3c37c0265d8775f881271ba4d987e5ffb6 (diff) | |
| download | python-openstackclient-6329c04297f7f08159eb1e9a0e3c089e188397af.tar.gz | |
Merge "OSC Quota List"
Diffstat (limited to 'openstackclient/tests/unit/network')
| -rw-r--r-- | openstackclient/tests/unit/network/v2/fakes.py | 50 |
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 fed4b788..d3685409 100644 --- a/openstackclient/tests/unit/network/v2/fakes.py +++ b/openstackclient/tests/unit/network/v2/fakes.py @@ -1629,3 +1629,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 |
