Revision 2060348b Ganeti/HTools/Instance.hs
b/Ganeti/HTools/Instance.hs | ||
---|---|---|
40 | 40 |
, vcpus :: Int -- ^ Number of VCPUs |
41 | 41 |
, running :: Bool -- ^ Whether the instance |
42 | 42 |
-- is running |
43 |
, run_st :: String -- ^ Original (text) run status
|
|
44 |
, pnode :: T.Ndx -- ^ Original primary node
|
|
45 |
, snode :: T.Ndx -- ^ Original secondary node
|
|
43 |
, runSt :: String -- ^ Original (text) run status
|
|
44 |
, pNode :: T.Ndx -- ^ Original primary node
|
|
45 |
, sNode :: T.Ndx -- ^ Original secondary node
|
|
46 | 46 |
, idx :: T.Idx -- ^ Internal index for |
47 | 47 |
-- book-keeping |
48 | 48 |
} deriving (Show) |
... | ... | |
76 | 76 |
"running" -> True |
77 | 77 |
"ERROR_up" -> True |
78 | 78 |
_ -> False, |
79 |
run_st = run_init,
|
|
80 |
pnode = pn,
|
|
81 |
snode = sn,
|
|
79 |
runSt = run_init,
|
|
80 |
pNode = pn,
|
|
81 |
sNode = sn,
|
|
82 | 82 |
idx = -1 |
83 | 83 |
} |
84 | 84 |
|
... | ... | |
104 | 104 |
setPri :: Instance -- ^ the original instance |
105 | 105 |
-> T.Ndx -- ^ the new primary node |
106 | 106 |
-> Instance -- ^ the modified instance |
107 |
setPri t p = t { pnode = p }
|
|
107 |
setPri t p = t { pNode = p }
|
|
108 | 108 |
|
109 | 109 |
-- | Changes the secondary node of the instance. |
110 | 110 |
setSec :: Instance -- ^ the original instance |
111 | 111 |
-> T.Ndx -- ^ the new secondary node |
112 | 112 |
-> Instance -- ^ the modified instance |
113 |
setSec t s = t { snode = s }
|
|
113 |
setSec t s = t { sNode = s }
|
|
114 | 114 |
|
115 | 115 |
-- | Changes both nodes of the instance. |
116 | 116 |
setBoth :: Instance -- ^ the original instance |
117 | 117 |
-> T.Ndx -- ^ new primary node index |
118 | 118 |
-> T.Ndx -- ^ new secondary node index |
119 | 119 |
-> Instance -- ^ the modified instance |
120 |
setBoth t p s = t { pnode = p, snode = s } |
|
120 |
setBoth t p s = t { pNode = p, sNode = s } |
Also available in: Unified diff