summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorblsaws <blsaws@hotmail.com>2015-11-12 09:44:35 -0800
committerblsaws <blsaws@hotmail.com>2015-11-12 09:44:35 -0800
commit8052ec6dd0ac0cddb5586fed384092d688616613 (patch)
tree39c069f5951970338e35ca2790cf98a0ca079988 /docs
parent05eb3fe752ae310721aba503fc999c1c1fe01148 (diff)
Add Resource Use Limits use case
JIRA: COPPER-3 Change-Id: I1fcb4df3b5e7c24fdf34802e3f3f1ecbda842cd6 Signed-off-by: blsaws <blsaws@hotmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/design/usecases.rst26
1 files changed, 23 insertions, 3 deletions
diff --git a/docs/design/usecases.rst b/docs/design/usecases.rst
index c320ec6..ca37e13 100644
--- a/docs/design/usecases.rst
+++ b/docs/design/usecases.rst
@@ -151,15 +151,16 @@ As implemented through OpenStack Congress:
ldap:group(user1, g),
ldap:group(user2, g)
+Resource Management
+-------------------
+
Resource Reclamation
---------------------
+....................
As a service provider or tenant, I need to be informed of VMs that are under-utilized so that I can reclaim the VI resources. (example from `RuleYourCloud blog <http://ruleyourcloud.com/2015/03/12/scaling-up-congress.html>`_)
As implemented through OpenStack Congress:
-*Note: untested example...*
-
.. code::
reclaim_server(vm) :-
@@ -171,3 +172,22 @@ As implemented through OpenStack Congress:
nova:servers(vm, vm_name, user_id),
keystone:users(user_id, email)
+Resource Use Limits
+...................
+
+As a tenant or service provider, I need to be automatically terminate an instance that has run for a pre-agreed maximum duration.
+
+As implemented through OpenStack Congress:
+
+.. code::
+
+ terminate_server(vm) :-
+ ceilometer:statistics("duration",vm, avg_cpu),
+ lessthan(avg_cpu, 1)
+
+ error(user_id, email, vm_name) :-
+ reclaim_server(vm),
+ nova:servers(vm, vm_name, user_id),
+ keystone:users(user_id, email)
+
+