Commit 39f2c65c by Őry Máté

vm: fix local_tasks.flush

* accept uuid
* call the correct method
parent 039bcad8
......@@ -101,10 +101,11 @@ class Node(TimeStampedModel):
self.enabled = False
def flush(self, user=None):
def flush(self, user=None, task_uuid=None):
"""Disable node and move all instances to other ones.
with node_activity('flush', node=self, user=user) as act:
with node_activity('flush', node=self, user=user,
task_uuid=task_uuid) as act:
self.disable(user, act)
for i in self.instance_set.all():
with act.sub_activity('migrate_instance_%d' %
......@@ -61,4 +61,4 @@ def migrate(instance, to_node, user):
def flush(node, user):
node.migrate(, user=user)
node.flush(, user=user)
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