Re: [PATCH master 18/52] Update memory/maxmem reading in Rapi backend

2012-01-11 Thread René Nussbaumer
On Mon, Jan 9, 2012 at 11:58, Iustin Pop ius...@google.com wrote:
 Recent changes to the instance beparams have replaced memory with
 maxmem in Rapi bulk queries. Until this is either reverted (for
 backwards compat) or we decide to go ahead with only maxmem, we change
 the backend to read both; this only affects the instance down code
 path (where ``oper_ram`` is missing).
 ---
  htools/Ganeti/HTools/Rapi.hs |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

LGTM

René


[PATCH master 18/52] Update memory/maxmem reading in Rapi backend

2012-01-09 Thread Iustin Pop
Recent changes to the instance beparams have replaced memory with
maxmem in Rapi bulk queries. Until this is either reverted (for
backwards compat) or we decide to go ahead with only maxmem, we change
the backend to read both; this only affects the instance down code
path (where ``oper_ram`` is missing).
---
 htools/Ganeti/HTools/Rapi.hs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/htools/Ganeti/HTools/Rapi.hs b/htools/Ganeti/HTools/Rapi.hs
index c6cb648..6172cc2 100644
--- a/htools/Ganeti/HTools/Rapi.hs
+++ b/htools/Ganeti/HTools/Rapi.hs
@@ -112,7 +112,7 @@ parseInstance ktn a = do
   omem - extract oper_ram a
   mem - case omem of
JSRational _ _ - annotateResult owner_name (fromJVal omem)
-   _ - extract memory beparams
+   _ - extract memory beparams `mplus` extract maxmem beparams
   vcpus - extract vcpus beparams
   pnode - extract pnode a = lookupNode ktn name
   snodes - extract snodes a
-- 
1.7.3.1