def getPrepareTasks(self): taskset = Device.getPrepareTasks(self) assign_template = tasks.Task("assign-template", self._assignTemplate, reverseFn=self._fallbackDestroy) assign_host = tasks.Task("assign-host", self._assignHost, reverseFn=self._fallbackDestroy) assign_vmid = tasks.Task("assign-vmid", self._assignVmid, reverseFn=self._fallbackDestroy, after=assign_host) create_vm = tasks.Task("create-vm", self._createVm, reverseFn=self._fallbackDestroy, after=assign_vmid) configure_vm = tasks.Task("configure-vm", self._configureVm, reverseFn=self._fallbackDestroy, after=create_vm) create_interfaces = tasks.Task("create-interfaces", self._createInterfaces, reverseFn=self._fallbackDestroy, after=configure_vm) taskset.add([assign_template, assign_host, assign_vmid, create_vm, configure_vm, create_interfaces]) return self._adaptTaskset(taskset)
def getPrepareTasks(self): taskset = Device.getPrepareTasks(self) assign_template = tasks.Task("assign-template", self._assignTemplate) assign_host = tasks.Task("assign-host", self._assignHost) assign_vmid = tasks.Task("assign-vmid", self._assignVmid, after=assign_host) create_vm = tasks.Task("create-vm", self._createVm, reverseFn=self._fallbackDestroy, after=assign_vmid) use_template = tasks.Task("use-template", self._useTemplate, reverseFn=self._fallbackDestroy, after=create_vm) configure_vm = tasks.Task("configure-vm", self._configureVm, reverseFn=self._fallbackDestroy, after=create_vm) for iface in self.interfaceSetAll(): taskset.add(tasks.Task("create-interface-%s" % iface.name, self._createIface, args=(iface,), reverseFn=self._fallbackDestroy, after=create_vm)) taskset.add([assign_template, assign_host, assign_vmid, create_vm, use_template, configure_vm]) return self._adaptTaskset(taskset)
def getPrepareTasks(self): taskset = Device.getPrepareTasks(self) taskset.add(tasks.Task("prepare", self._prepareDev)) return taskset