Skip to content

Commit 35d6bc8

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add --router-routes option to quota commands"
2 parents 32cd99b + 0a8e7a8 commit 35d6bc8

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

openstackclient/common/quota.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
'subnet': 'subnets',
7272
'port': 'ports',
7373
'router': 'routers',
74+
'router_route': 'router-routes',
7475
'rbac_policy': 'rbac-policies',
7576
'subnetpool': 'subnetpools',
7677
}
@@ -79,6 +80,7 @@
7980
'floating_ips',
8081
'networks',
8182
'rbac_policies',
83+
'router_routes',
8284
'routers',
8385
'ports',
8486
'security_group_rules',
@@ -439,6 +441,7 @@ def _list_quota_network(
439441
'networks',
440442
'ports',
441443
'rbac_policies',
444+
'router_routes',
442445
'routers',
443446
'security_groups',
444447
'security_group_rules',
@@ -451,6 +454,7 @@ def _list_quota_network(
451454
'Networks',
452455
'Ports',
453456
'RBAC Policies',
457+
'Router Routes',
454458
'Routers',
455459
'Security Groups',
456460
'Security Group Rules',

openstackclient/tests/unit/common/test_quota.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class TestQuotaList(TestQuota):
6868
'Networks',
6969
'Ports',
7070
'RBAC Policies',
71+
'Router Routes',
7172
'Routers',
7273
'Security Groups',
7374
'Security Group Rules',
@@ -134,6 +135,10 @@ def setUp(self):
134135
self.network_quotas[0].networks,
135136
self.network_quotas[0].ports,
136137
self.network_quotas[0].rbac_policies,
138+
# TODO(ralonsoh): restore once [1] is merged and released.
139+
# [1]https://review.opendev.org/c/openstack/openstacksdk/+/991063
140+
# self.network_quotas[0].router_routes,
141+
getattr(self.network_quotas[0], 'router_routes', ''),
137142
self.network_quotas[0].routers,
138143
self.network_quotas[0].security_groups,
139144
self.network_quotas[0].security_group_rules,
@@ -948,6 +953,7 @@ class TestQuotaShow(TestQuota):
948953
'pools': {'limit': 0, 'reserved': 0, 'used': 0},
949954
'ports': {'limit': 0, 'reserved': 0, 'used': 0},
950955
'rbac_policies': {'limit': 0, 'reserved': 0, 'used': 0},
956+
'router_routes': {'limit': 0, 'reserved': 0, 'used': 0},
951957
'routers': {'limit': 0, 'reserved': 0, 'used': 0},
952958
'security_group_rules': {'limit': 0, 'reserved': 0, 'used': 0},
953959
'security_groups': {'limit': 0, 'reserved': 0, 'used': 0},
@@ -1146,6 +1152,7 @@ def test_quota_show__with_network_and_usage(self):
11461152
('pools', 0, 0, 0),
11471153
('ports', 0, 0, 0),
11481154
('rbac_policies', 0, 0, 0),
1155+
('router_routes', 0, 0, 0),
11491156
('routers', 0, 0, 0),
11501157
('security_group_rules', 9, 5, 7),
11511158
('security_groups', 0, 0, 0),
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
features:
3+
- |
4+
Added ``--router-routes`` option to the ``quota set`` command and
5+
``router_routes`` to the ``quota show`` and ``quota list --network``
6+
output. This exposes the new Neutron ``router_route`` per-project
7+
quota that controls the total number of extra routes across all
8+
routers in a project.

0 commit comments

Comments
 (0)