Commit f25b8f58 authored by Iustin Pop's avatar Iustin Pop
Browse files

Export ndparams in iallocator



Strangely, these were not exported at all before.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent a194dc28
...@@ -14571,7 +14571,7 @@ class IAllocator(object): ...@@ -14571,7 +14571,7 @@ class IAllocator(object):
   
data["nodegroups"] = self._ComputeNodeGroupData(cfg) data["nodegroups"] = self._ComputeNodeGroupData(cfg)
   
config_ndata = self._ComputeBasicNodeData(ninfo) config_ndata = self._ComputeBasicNodeData(cfg, ninfo)
data["nodes"] = self._ComputeDynamicNodeData(ninfo, node_data, node_iinfo, data["nodes"] = self._ComputeDynamicNodeData(ninfo, node_data, node_iinfo,
i_list, config_ndata) i_list, config_ndata)
assert len(data["nodes"]) == len(ninfo), \ assert len(data["nodes"]) == len(ninfo), \
...@@ -14597,7 +14597,7 @@ class IAllocator(object): ...@@ -14597,7 +14597,7 @@ class IAllocator(object):
return ng return ng
   
@staticmethod @staticmethod
def _ComputeBasicNodeData(node_cfg): def _ComputeBasicNodeData(cfg, node_cfg):
"""Compute global node data. """Compute global node data.
   
@rtype: dict @rtype: dict
...@@ -14615,6 +14615,7 @@ class IAllocator(object): ...@@ -14615,6 +14615,7 @@ class IAllocator(object):
"group": ninfo.group, "group": ninfo.group,
"master_capable": ninfo.master_capable, "master_capable": ninfo.master_capable,
"vm_capable": ninfo.vm_capable, "vm_capable": ninfo.vm_capable,
"ndparams": cfg.GetNdParams(ninfo),
}) })
for ninfo in node_cfg.values()) for ninfo in node_cfg.values())
   
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment