Adding support for Quotas to the Cisco plugin
The API quotas support as implemented in https:/
Blueprint information
- Status:
- Complete
- Approver:
- Kyle Mestery
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- Kyle Mestery
- Definition:
- Superseded
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- Armando Migliaccio
Related branches
Related bugs
Sprints
Whiteboard
Yong sheng gong:
If the resource is countable by the default count function:
def _count_
obj_getter = getattr(plugin, "get_%s" % resources)
obj_list = obj_getter(context, filters=
return len(obj_list) if obj_list else 0
we can enforce the quota by one of:
1.defining it in quantum.conf:
[QUOTAS]
# resource name(s) that are supported in quota features
# quota_items = network,
# default number of resource allowed per tenant, minus for unlimited
# quota_newresource = 10
2. register it just like the way l3 extension does:
quota.QUOTAS.
End of yong sheng gong comment