From b990eedd100be28469c65af95935f90e2583cafe Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Mon, 28 Nov 2011 14:17:40 +0000
Subject: [PATCH] Hypervisor: allow ballooning of instance memory
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This new hypervisor call sets the memory of an instance to a new value,
through ballooning.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: RenΓ© Nussbaumer <rn@google.com>
---
 lib/hypervisor/hv_base.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/lib/hypervisor/hv_base.py b/lib/hypervisor/hv_base.py
index 44f80e155..42fd64c91 100644
--- a/lib/hypervisor/hv_base.py
+++ b/lib/hypervisor/hv_base.py
@@ -295,6 +295,17 @@ class BaseHypervisor(object):
     """
     pass
 
+  def BalloonInstanceMemory(self, instance, mem):
+    """Balloon an instance memory to a certain value.
+
+    @type instance: L{objects.Instance}
+    @param instance: instance to be accepted
+    @type mem: int
+    @param mem: actual memory size to use for instance runtime
+
+    """
+    raise NotImplementedError
+
   def FinalizeMigrationDst(self, instance, info, success):
     """Finalize the instance migration on the target node.
 
-- 
GitLab