Commit 692738fc authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

cmdlib: Function to get all secondary instances on a certain node

Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 6fd35c4d
......@@ -699,6 +699,19 @@ def _CheckInstanceBridgesExist(lu, instance, node=None):
_CheckNicsBridgesExist(lu, instance.nics, node)
def _GetNodeSecondaryInstances(cfg, node_name):
"""Returns secondary instances on a node.
instances = []
for (_, inst) in cfg.GetAllInstancesInfo().iteritems():
if node_name in inst.secondary_nodes:
return instances
class LUDestroyCluster(NoHooksLU):
"""Logical unit for destroying the cluster.
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