In some part in the code we import objects.
In the Openstack style guidelines they recommend to import only modules.
http://docs.openstack.org/developer/hacking/#imports
Change-Id: Ibd3464b52fd70bbfe77ce35cdffbbef95de24b12
With the addition of Sub CAs in Barbican, comes another resource that
can be created by project admins. To prevent one project admin from
impacting other projects, quotas can be enforced. This commit adds
quota management and enforcement for the CA resource.
Change-Id: Iee7fb433e0879bc8739ba62f0a34e73b2103c5fa
Partially-implements: blueprint add-cas
During development of the project quotas, I discovered that transport keys
are defined one per plugin. They can not be created or deleted by a
project admin. As such, quotas should not and can not apply to transport
keys. Some stray snippets of transport key quota key leaked into the
commits. This commit removes them.
Change-Id: I6f81fceec780c941dc7f731d02a8d6fe5d5fff40
Relates-to: blueprint quota-support-on-barbican-resources
In the interest of smaller CRs, this CR partially implements the
quota support blueprint. It includes code model and repository
used to store project quota information. Unit and functional tests
are also provided to verify the implementation.
This CR also cover some small design changes, such as: the new
defaults is for unlimited quotas for all resources.
Implements: blueprint quota-support-on-barbican-resources
Change-Id: Ief79dd36fd35528c9d8586d77e01d1f9ad723f4d
In the interest of smaller CRs, this CR partially implements the
quota support blueprint. It includes code for configuration,
controller, and validator. Also, the framework for unit and functional
tests.
The controllers process the URL rsources /qoutas and /project-quotas.
The configuration code reads the quota default values from the [quotas]
section of barbican.conf. The validator code checks the validity of
the JSON sent with a POST /project-quotas/ API command.
Implements: blueprint quota-support-on-barbican-resources
Change-Id: Iad09b19cf6b9a6fa6b29d8b99e3f72172f801070