Commit b6ba0036 by Dudás Ádám

vm: use operations

parent 48dcff49
......@@ -16,11 +16,12 @@ from .instance import pre_state_changed
from .network import InterfaceTemplate
from .network import Interface
from .node import Node
from .operation import Operation
__all__ = [
'InstanceActivity', 'InstanceActiveManager', 'BaseResourceConfigModel',
'NamedBaseResourceConfig', 'VirtualMachineDescModel', 'InstanceTemplate',
'Instance', 'instance_activity', 'post_state_changed', 'pre_state_changed',
'InterfaceTemplate', 'Interface', 'Trait', 'Node', 'NodeActivity', 'Lease',
'node_activity', 'Operation',
......@@ -13,66 +13,3 @@ def async_operation(operation_id, instance_pk, activity_pk, **kwargs):
return operation._exec_op(activity=activity, **kwargs)
# TODO: Keep synchronised with Instance funcs
def deploy(instance, user):
instance.deploy(, user=user)
def redeploy(instance, user):
instance.redeploy(, user=user)
def shut_off(instance, user):
instance.shut_off(, user=user)
def destroy(instance, user):
instance.destroy(, user=user)
def save_as_template(instance, name, user, params):
user=user, **params)
def sleep(instance, user):
instance.sleep(, user=user)
def wake_up(instance, user):
instance.wake_up(, user=user)
def shutdown(instance, user):
instance.shutdown(, user=user)
def reset(instance, user):
instance.reset(, user=user)
def reboot(instance, user):
instance.reboot(, user=user)
def migrate(instance, to_node, user):
instance.migrate(to_node,, user=user)
def flush(node, 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