Commit 887b52e8 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

cmdlib: Adding annotation helper for special cases


Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 99ccf8b9
......@@ -599,6 +599,21 @@ def _MakeLegacyNodeInfo(data):
})
 
 
def _AnnotateDiskParams(instance, devs, cfg):
"""Little helper wrapper to the rpc annotation method.
@param instance: The instance object
@type devs: List of L{objects.Disk}
@param devs: The root devices (not any of its children!)
@param cfg: The config object
@returns The annotated disk copies
@see L{rpc.AnnotateDiskParams}
"""
return rpc.AnnotateDiskParams(instance.disk_template, devs,
cfg.GetInstanceDiskParams(instance))
def _CheckInstancesNodeGroups(cfg, instances, owned_groups, owned_nodes,
cur_group_uuid):
"""Checks if node groups for locked instances are still correct.
......
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