Revision 72747d91 src/Ganeti/HTools/Backend/Luxi.hs
b/src/Ganeti/HTools/Backend/Luxi.hs | ||
---|---|---|
4 | 4 |
|
5 | 5 |
{- |
6 | 6 |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012 Google Inc. |
|
7 |
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
|
|
8 | 8 |
|
9 | 9 |
This program is free software; you can redistribute it and/or modify |
10 | 10 |
it under the terms of the GNU General Public License as published by |
... | ... | |
163 | 163 |
_ -> convert "be/memory" mem |
164 | 164 |
xvcpus <- convert "be/vcpus" vcpus |
165 | 165 |
xpnode <- convert "pnode" pnode >>= lookupNode ktn xname |
166 |
xsnodes <- convert "snodes" snodes::Result [JSString]
|
|
167 |
snode <- if null xsnodes
|
|
168 |
then return Node.noSecondary
|
|
169 |
else lookupNode ktn xname (fromJSString $ head xsnodes)
|
|
166 |
xsnodes <- convert "snodes" snodes::Result [String] |
|
167 |
snode <- case xsnodes of
|
|
168 |
[] -> return Node.noSecondary
|
|
169 |
x:_ -> lookupNode ktn xname x
|
|
170 | 170 |
xrunning <- convert "status" status |
171 | 171 |
xtags <- convert "tags" tags |
172 | 172 |
xauto_balance <- convert "auto_balance" auto_balance |
Also available in: Unified diff