Add --router and --floatingip to quota-update options.

Fixes bug 1085820

Change-Id: I333b21414ec159cbf8474d47bd8ba3c6bd3cf8ad
This commit is contained in:
Akihiro MOTOKI
2012-12-03 20:10:38 +09:00
parent f6dcfd855b
commit 45c471899b

View File

@@ -164,6 +164,12 @@ class UpdateQuota(QuantumCommand, show.ShowOne):
parser.add_argument(
'--port', metavar='ports',
help='the limit of port quota')
parser.add_argument(
'--router', metavar='routers',
help='the limit of router quota')
parser.add_argument(
'--floatingip', metavar='floatingips',
help='the limit of floating IP quota')
quantumv20.add_extra_argument(
parser, 'value_specs',
'new values for the %s' % self.resource)
@@ -183,7 +189,7 @@ class UpdateQuota(QuantumCommand, show.ShowOne):
quantum_client = self.get_client()
quantum_client.format = parsed_args.request_format
quota = {}
for resource in ('network', 'subnet', 'port'):
for resource in ('network', 'subnet', 'port', 'router', 'floatingip'):
if getattr(parsed_args, resource):
quota[resource] = self._validate_int(
resource,