Commit c5b3cd6a by Dudás Ádám

manager: add trait checking to scheduler

parent d5924475
......@@ -3,6 +3,8 @@ def get_node(instance, nodes):
'''
# Return first Node or None
try:
req_traits = set(instance.req_traits.all())
nodes = [n for n in nodes if req_traits.issubset(n.traits.all())]
return nodes[0]
except:
return None
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 sign in to comment