Commit d79f008f by Őry Máté

common: inherit system param from parent-calls

fixes #329
parent a7e9781e
......@@ -77,6 +77,8 @@ class Operation(object):
parent_activity = auxargs.pop('parent_activity')
if parent_activity and user is None and not skip_auth_check:
user = parent_activity.user
if user is None: # parent was a system call
skip_auth_check = True
# check for unexpected keyword arguments
argspec = getargspec(self._operation)
......
......@@ -415,7 +415,7 @@ class DestroyOperation(InstanceOperation):
self.instance.destroy_net()
if self.instance.node:
self.instance._delete_vm(parent_activity=activity, system=system)
self.instance._delete_vm(parent_activity=activity)
# Destroy disks
with activity.sub_activity(
......@@ -425,8 +425,7 @@ class DestroyOperation(InstanceOperation):
# Delete mem. dump if exists
try:
self.instance._delete_mem_dump(parent_activity=activity,
system=system)
self.instance._delete_mem_dump(parent_activity=activity)
except:
pass
......@@ -785,7 +784,7 @@ class SleepOperation(InstanceOperation):
readable_name=ugettext_noop(
"shutdown network")):
self.instance.shutdown_net()
self.instance._suspend_vm(parent_activity=activity, system=system)
self.instance._suspend_vm(parent_activity=activity)
self.instance.yield_node()
@register_operation
......
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