Doron Fediuck has uploaded a new change for review.

Change subject: Renaming min_guarantee to balloon_min
......................................................................

Renaming min_guarantee to balloon_min

Change-Id: I0c67e3830c7da3d99f3307a3d4f4e2af39853ea8
Signed-off-by: Doron Fediuck <[email protected]>
---
M doc/balloon-qos.rules
M doc/balloon.rules
M mom/Collectors/GuestBalloon.py
M mom/HypervisorInterfaces/libvirtInterface.py
4 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/mom refs/changes/29/17029/1

diff --git a/doc/balloon-qos.rules b/doc/balloon-qos.rules
index c2cd392..30f2e37 100644
--- a/doc/balloon-qos.rules
+++ b/doc/balloon-qos.rules
@@ -1,7 +1,7 @@
 (def guest_qos (quest)
 {
-    (if (< guest.balloon_cur guest.min_guarantee)
-        (guest.Control "balloon_target" guest.min_guarantee) 0)
+    (if (< guest.balloon_cur guest.balloon_min)
+        (guest.Control "balloon_target" guest.balloon_min) 0)
 })
 
 (with Guests guest (guest_qos guest))
diff --git a/doc/balloon.rules b/doc/balloon.rules
index 1818665..42990a7 100644
--- a/doc/balloon.rules
+++ b/doc/balloon.rules
@@ -46,7 +46,7 @@
     # Given current conditions, determine the ideal guest memory size
     (defvar guest_used_mem (- (guest.StatAvg "balloon_cur")
                               (guest.StatAvg "mem_unused")))
-    (defvar balloon_min (min guest.min_guarantee (+ guest_used_mem
+    (defvar balloon_min (min guest.balloon_min (+ guest_used_mem
                            (* guest_free_percent guest.balloon_cur))))
     # But do not change it too fast
     (defvar balloon_size (* guest.balloon_cur
@@ -69,7 +69,7 @@
         # Minimally, increase so the guest has its desired free memory
         (defvar guest_used_mem (- (guest.StatAvg "balloon_cur")
                                   (guest.StatAvg "mem_unused")))
-        (defvar balloon_min (min guest.min_guarantee (+ guest_used_mem
+        (defvar balloon_min (min guest.balloon_min (+ guest_used_mem
                                (* guest_free_percent guest.balloon_cur))))
         # Otherwise, increase according to the max balloon change
         (defvar balloon_size (* guest.balloon_cur
diff --git a/mom/Collectors/GuestBalloon.py b/mom/Collectors/GuestBalloon.py
index 69b7259..87e37eb 100644
--- a/mom/Collectors/GuestBalloon.py
+++ b/mom/Collectors/GuestBalloon.py
@@ -20,7 +20,7 @@
     This Collector uses hypervisor interface to collect guest balloon info
     """
     def getFields(self=None):
-        return set(['balloon_cur', 'balloon_max', 'min_guarantee'])
+        return set(['balloon_cur', 'balloon_max', 'balloon_min'])
 
     def __init__(self, properties):
         self.hypervisor_iface = properties['hypervisor_iface']
diff --git a/mom/HypervisorInterfaces/libvirtInterface.py 
b/mom/HypervisorInterfaces/libvirtInterface.py
index 93dfbf4..c00f3cf 100644
--- a/mom/HypervisorInterfaces/libvirtInterface.py
+++ b/mom/HypervisorInterfaces/libvirtInterface.py
@@ -228,7 +228,7 @@
             self.logger.error('Failed to get domain info')
             return None
         ret =  {'balloon_max': info[1], 'balloon_cur': info[2],
-                'min_guarantee': self._getGuaranteedMemory(domain) }
+                'balloon_min': self._getGuaranteedMemory(domain) }
         return ret
 
     def setVmBalloonTarget(self, uuid, target):


-- 
To view, visit http://gerrit.ovirt.org/17029
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c67e3830c7da3d99f3307a3d4f4e2af39853ea8
Gerrit-PatchSet: 1
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Doron Fediuck <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to