Revision 81e3ab4f
b/lib/cmdlib.py | ||
---|---|---|
1229 | 1229 |
return mc_now < mc_should |
1230 | 1230 |
|
1231 | 1231 |
|
1232 |
def _CalculateGroupIPolicy(cfg, group): |
|
1233 |
"""Calculate instance policy for group. |
|
1234 |
|
|
1235 |
""" |
|
1236 |
cluster = cfg.GetClusterInfo() |
|
1237 |
return cluster.SimpleFillIPolicy(group.ipolicy) |
|
1238 |
|
|
1239 |
|
|
1232 | 1240 |
def _CheckNicsBridgesExist(lu, target_nics, target_node): |
1233 | 1241 |
"""Check that the brigdes needed by a list of nics exist. |
1234 | 1242 |
|
b/lib/config.py | ||
---|---|---|
561 | 561 |
result.append("duplicate node group name '%s'" % nodegroup.name) |
562 | 562 |
else: |
563 | 563 |
nodegroups_names.add(nodegroup.name) |
564 |
group_name = "group %s" % nodegroup.name |
|
565 |
_helper_ipolicy(group_name, cluster.SimpleFillIPolicy(nodegroup.ipolicy)) |
|
566 |
_helper_ispecs(group_name, cluster.SimpleFillIPolicy(nodegroup.ipolicy)) |
|
564 | 567 |
if nodegroup.ndparams: |
565 |
_helper("group %s" % nodegroup.name, "ndparams",
|
|
568 |
_helper(group_name, "ndparams",
|
|
566 | 569 |
cluster.SimpleFillND(nodegroup.ndparams), |
567 | 570 |
constants.NDS_PARAMETER_TYPES) |
568 | 571 |
|
b/lib/objects.py | ||
---|---|---|
1257 | 1257 |
"members", |
1258 | 1258 |
"ndparams", |
1259 | 1259 |
"diskparams", |
1260 |
"ipolicy", |
|
1260 | 1261 |
"serial_no", |
1261 | 1262 |
"hv_state_static", |
1262 | 1263 |
"disk_state_static", |
... | ... | |
1304 | 1305 |
self.mtime = time.time() |
1305 | 1306 |
|
1306 | 1307 |
self.diskparams = UpgradeDiskParams(self.diskparams) |
1308 |
if self.ipolicy is None: |
|
1309 |
self.ipolicy = MakeEmptyIPolicy() |
|
1307 | 1310 |
|
1308 | 1311 |
def FillND(self, node): |
1309 | 1312 |
"""Return filled out ndparams for L{objects.Node} |
Also available in: Unified diff