Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 0305113317f9e80328b139dce3f45533 > files > 9

python-quantumclient-2.1-1.fc18.src.rpm

From 964ae725d505c263ad6c069a81b80aef21132f71 Mon Sep 17 00:00:00 2001
From: Akihiro MOTOKI <motoki@da.jp.nec.com>
Date: Mon, 3 Dec 2012 20:10:38 +0900
Subject: [PATCH] Add --router and --floatingip to quota-update options.

Fixes bug 1085820

Change-Id: I333b21414ec159cbf8474d47bd8ba3c6bd3cf8ad
---
 quantumclient/quantum/v2_0/quota.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/quantumclient/quantum/v2_0/quota.py b/quantumclient/quantum/v2_0/quota.py
index 2a6979c..0e74949 100644
--- a/quantumclient/quantum/v2_0/quota.py
+++ b/quantumclient/quantum/v2_0/quota.py
@@ -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,