Commit 76da6860 by Guba Sándor

operations: added subactivity for network attach/detach

parent 9e60b9b7
...@@ -103,7 +103,8 @@ class AddInterfaceOperation(InstanceOperation): ...@@ -103,7 +103,8 @@ class AddInterfaceOperation(InstanceOperation):
managed=managed, owner=user, vlan=vlan) managed=managed, owner=user, vlan=vlan)
if self.instance.is_running: if self.instance.is_running:
self.instance.attach_network(net) with activity.sub_activity('attach_network'):
self.instance.attach_network(net)
net.deploy() net.deploy()
return net return net
...@@ -356,7 +357,8 @@ class RemoveInterfaceOperation(InstanceOperation): ...@@ -356,7 +357,8 @@ class RemoveInterfaceOperation(InstanceOperation):
def _operation(self, activity, user, system, interface): def _operation(self, activity, user, system, interface):
if self.instance.is_running: if self.instance.is_running:
self.instance.detach_network(interface) with activity.sub_activity('detach_network'):
self.instance.detach_network(interface)
interface.shutdown() interface.shutdown()
interface.destroy() interface.destroy()
......
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