Skip to content
Snippets Groups Projects
Commit e6244d00 authored by Iustin Pop's avatar Iustin Pop
Browse files

Export the cluster ipolicy in iallocator


And remove a strange comment (the commit which introduced it,
d61df03e, doesn't explain it). Also document these new keys in
iallocator.rst.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 1e7acc3b
No related branches found
No related tags found
No related merge requests found
...@@ -90,6 +90,10 @@ cluster_tags ...@@ -90,6 +90,10 @@ cluster_tags
enabled_hypervisors enabled_hypervisors
the list of enabled hypervisors the list of enabled hypervisors
ipolicy
the cluster-wide instance policy (for information; the per-node group
values take precedence and should be used instead)
request request
a dictionary containing the details of the request; the keys vary a dictionary containing the details of the request; the keys vary
depending on the type of operation that's being requested, as depending on the type of operation that's being requested, as
...@@ -105,6 +109,8 @@ nodegroups ...@@ -105,6 +109,8 @@ nodegroups
alloc_policy alloc_policy
the allocation policy of the node group (consult the semantics of the allocation policy of the node group (consult the semantics of
this attribute in the :manpage:`gnt-group(8)` manpage) this attribute in the :manpage:`gnt-group(8)` manpage)
ipolicy
the instance policy of the node group
instances instances
a dictionary with the data for the current existing instance on the a dictionary with the data for the current existing instance on the
......
...@@ -14343,7 +14343,7 @@ class IAllocator(object): ...@@ -14343,7 +14343,7 @@ class IAllocator(object):
"cluster_name": cfg.GetClusterName(), "cluster_name": cfg.GetClusterName(),
"cluster_tags": list(cluster_info.GetTags()), "cluster_tags": list(cluster_info.GetTags()),
"enabled_hypervisors": list(cluster_info.enabled_hypervisors), "enabled_hypervisors": list(cluster_info.enabled_hypervisors),
# we don't have job IDs "ipolicy": cluster_info.ipolicy,
} }
ninfo = cfg.GetAllNodesInfo() ninfo = cfg.GetAllNodesInfo()
iinfo = cfg.GetAllInstancesInfo().values() iinfo = cfg.GetAllInstancesInfo().values()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment