cloudstack/ui/scripts
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
..
ui CLOUDSTACK-8592: Implement Quota service 2015-12-07 23:02:48 +05:30
ui-custom CLOUDSTACK-9092: L10n fix in "Add LDAP Account page" 2015-11-30 11:21:17 +05:30
accounts.js Merge branch '4.6' 2015-12-07 12:44:07 +05:30
accountsWizard.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
affinity.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
autoscaler.js CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI 2015-08-18 11:16:14 +01:00
cloud.core.callbacks.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
cloudStack.js CLOUDSTACK-9020: UI enhancements from metrics view 2015-11-25 14:15:13 +05:30
configuration.js CLOUDSTACK-8984: VPC Network offerings tab missing from UI 2015-10-29 09:21:16 +05:30
dashboard.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
docs.js CLOUDSTACK-8647: UI for trust AD feature 2015-08-27 17:34:02 +05:30
domains.js CLOUDSTACK-8647: UI for trust AD feature 2015-08-27 17:34:02 +05:30
events.js Removed trailing whitespace from ui/scripts/*.js 2015-08-07 11:25:15 +02:00
globalSettings.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
installWizard.js api: avoid sending sensitive data in api response 2015-03-11 16:34:56 +05:30
instanceWizard.js Merge pull request #937 from autotraderuk/sec-group-sorting 2015-12-04 20:21:18 +01:00
instances.js CLOUDSTACK-9051: update nic IP address of stopped vm 2015-11-30 09:20:25 +01:00
lbStickyPolicy.js CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI 2015-08-18 11:16:14 +01:00
metrics.js CLOUDSTACK-9020: Metrics views for CloudStack UI 2015-11-19 15:17:44 +05:30
network.js Merge pull request #897 from nitin-maharana/CloudStack-Nitin10 2015-11-02 20:04:51 +01:00
plugins.js Plugin API: Support multiple JS includes per plugin 2014-01-27 12:39:36 -08:00
projects.js Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
regions.js CLOUDSTACK-8744 Add missing localization (l10n) for several parts in the UI 2015-08-18 11:16:14 +01:00
sharedFunctions.js Made interface changes related to CLOUDSTACK-8580 2015-08-14 11:13:21 +02:00
storage.js Merge branch '4.6' 2015-12-07 12:44:07 +05:30
system.js Merge pull request #1007 from ustcweizhou/dedicated-ip-for-domain 2015-11-29 09:39:25 +01:00
templates.js CLOUDSTACK-8766: Fix infinite scrolling pagination for zonal iso/template listing 2015-08-28 13:07:47 +05:30
vm_snapshots.js UI code cleanup: Fix trailing commas in JS 2013-09-24 11:16:13 -07:00
vpc.js [UI] change alert to ui dialog in response of instance wizard 2015-11-06 13:49:32 +01:00
zoneWizard.js CLOUDSTACK-9044: Add RBD Primary Storage to the Zone Wizard. 2015-11-08 18:22:39 +01:00