Extending quota support neutron LBaaS entities

Note: This change is a continuation of the abandoned
      change https://review.openstack.org/#/c/59192/
      Previous change was abandoned due to rebase problem.

Extending quota mechanism to support neutron
LBaaS entities. Adding quota for vips, pools, members
and health monitors.

This is one of four changes related to the BP.
This one is for python-neutronclient package.
Another one is for neutron project, another for tempest project
and another one for horizon/openstack-dashboard project.

See blueprint neutron-quota-extension for another two changes.

Change-Id: I2bfb974d513bd21b4dac6c90ddc6ede19797caf9
Implements: blueprint neutron-quota-extension
This commit is contained in:
Evgeny Fedoruk
2014-01-28 23:57:01 -08:00
parent 8aacb125df
commit f8e23de0dd

View File

@@ -175,6 +175,19 @@ class UpdateQuota(neutronV20.NeutronCommand, show.ShowOne):
parser.add_argument(
'--security-group-rule', metavar='security_group_rules',
help=_('The limit of security groups rules'))
parser.add_argument(
'--vip', metavar='vips',
help=_('the limit of vips'))
parser.add_argument(
'--pool', metavar='pools',
help=_('the limit of pools'))
parser.add_argument(
'--member', metavar='members',
help=_('the limit of pool members'))
parser.add_argument(
'--health-monitor', metavar='health_monitors',
help=_('the limit of health monitors'))
return parser
def _validate_int(self, name, value):
@@ -189,7 +202,8 @@ class UpdateQuota(neutronV20.NeutronCommand, show.ShowOne):
def args2body(self, parsed_args):
quota = {}
for resource in ('network', 'subnet', 'port', 'router', 'floatingip',
'security_group', 'security_group_rule'):
'security_group', 'security_group_rule',
'vip', 'pool', 'member', 'health_monitor'):
if getattr(parsed_args, resource):
quota[resource] = self._validate_int(
resource,