Revision fa320fef src/Ganeti/Config.hs
b/src/Ganeti/Config.hs | ||
---|---|---|
34 | 34 |
, getDefaultNicLink |
35 | 35 |
, getDefaultHypervisor |
36 | 36 |
, getInstancesIpByLink |
37 |
, getMasterNodes |
|
37 | 38 |
, getMasterCandidates |
38 | 39 |
, getMasterOrCandidates |
39 | 40 |
, getMasterNetworkParameters |
... | ... | |
151 | 152 |
| nodeOffline node = NROffline |
152 | 153 |
| otherwise = NRRegular |
153 | 154 |
|
155 |
-- | Get the list of the master nodes (usually one). |
|
156 |
getMasterNodes :: ConfigData -> [Node] |
|
157 |
getMasterNodes cfg = |
|
158 |
filter ((==) NRMaster . getNodeRole cfg) . F.toList . configNodes $ cfg |
|
159 |
|
|
154 | 160 |
-- | Get the list of master candidates, /not including/ the master itself. |
155 | 161 |
getMasterCandidates :: ConfigData -> [Node] |
156 | 162 |
getMasterCandidates cfg = |
Also available in: Unified diff