cloudstack/tools
Abhinandan Prateek 987fcbd441 CLOUDSTACK-8592: Implement Quota service
Quota service while allowing for scalability will make sure that the cloud is
not exploited by attacks, careless use and program errors. To address this
problem, we propose to employ a quota-enforcement service that allows resource
usage within certain bounds as defined by policies and available quotas for
various entities.  Quota service extends the functionality of usage server to
provide a measurement for the resources used by the accounts and domains using a
common unit referred to as cloud currency in this document. It can be configured
to ensure that your usage won’t exceed the budget allocated to accounts/domain
in cloud currency.  It will let user know how much of the cloud resources he is
using. It will help the cloud admins, if they want, to ensure that a user does
not go beyond his allocated quota. Per usage cycle if a account is found to be
exceeding its quota then it is locked. Locking an account means that it will not
be able to initiat e a new resource allocation request, whether it is more
storage or an additional ip. Needless to say quota service as well as any action
on the account is configurable.

Changes from Github code review:

- Added marvin test for quota plugin API
- removed unused commented code
- debug messages in debug enabled check
- checks for nulls, fixed access to member variables and feature
- changes based on PR comments
- unit tests for UsageTypes
- unit tests for all Cmd classes
- unit tests for all service and manager impls
- try-catch-finally or try-with-resource in dao impls for failsafe db switching
- remove dead code
- add missing quota calculation case (regression fixed)
- replace tabs with spaces in pom.xmls
- quota: though default value for quota_calculated is 0, the usage server
  makes it null while entering usage entries. Flipping the condition so
  as to acocunt for that.
- quotatypes: fix NPE in quota type
- quota framework test fixes
- made statement period configurable
- changed default email templates to reflect the fact that exhausted quota may not result in a locked account
- added quotaUpdateCmd that refreshes quota balances and sends alerts and statements
- report quotaSummary command returns quota balance, quota usage and state for all account
- made UI framework changes to allow for text area input in edit views
- process usage entries that have greater than 0 usage
- orocess quota entries only if tariff is non zero
- if there are credit entries but no balance entry create a dummy balance entry
- remove any credit entries that are before the last balance entry
  when displaying balance statement
- on a rerun the last balance is now getting added

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS
PR: https://github.com/apache/cloudstack/pull/768

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2015-12-07 23:02:48 +05:30
..
apidoc CLOUDSTACK-8592: Implement Quota service 2015-12-07 23:02:48 +05:30
appliance changed the base iso file from debian-7.8.0 to debian-7.9.0 2015-09-15 21:37:44 +05:30
bugs-wiki fixing license headers in marvin 2012-07-04 18:45:08 -04:00
build Use version for RC branch name instead of branch 2015-11-30 22:21:04 +01:00
checkstyle Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00
cli tools: Remove cloudmonkey, add info in INSTALL.md 2013-07-28 22:53:12 +05:30
devcloud Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00
devcloud-kvm Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00
devcloud4 Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00
docker squashed commit for dockerfiles part#2 including comments from PR#910 2015-10-28 22:34:31 -04:00
eclipse CLOUDSTACK-8433: remove awsapi db usage and add upgrade cleanup path 2015-05-06 15:22:04 +02:00
git fixed hardcoded merge message location 2015-08-24 16:16:16 +02:00
jira jira-changes.py: generate content for CHANGES.md from jira filter 2014-11-30 21:16:59 -05:00
logo Ho ho ho! 2014-12-01 22:44:20 +05:30
marvin Merge release branch 4.6 to master 2015-12-03 20:42:41 +01:00
ngui CLOUDSTACK-9048: Fix typo for public network description 2015-11-09 11:18:44 -06:00
transifex Update L10N resource files on master branch (with 4.6 translation strings from Transifex) Add new HU resource file for Hungarian translation 2015-05-09 08:37:53 +02:00
travis Merge branch 'fixtravis3' of https://github.com/rsafonseca/cloudstack 2015-07-01 09:12:17 +02:00
utils/database_comparision_during_upgrade database_comparision_during_upgrade: add missing license header 2015-04-27 11:55:41 +02:00
vagrant Add missing license headers from recent branch merge 3c429ee 2015-03-18 11:03:54 +05:30
whisker Adding httpclient ssl source files to legal documentation 2013-08-26 12:36:59 -04:00
wix-cloudstack-maven-plugin Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00
pom.xml Updating pom.xml version numbers for release 4.7.0-SNAPSHOT 2015-11-15 18:54:13 +01:00