def getStartTasks(self): taskset = Device.getStartTasks(self) start_vm = tasks.Task("start-vm", self._startVm, reverseFn=self._fallbackStop) for iface in self.interfaceSetAll(): taskset.add(tasks.Task("start-interface-%s" % iface, self._startIface, args=(iface,), reverseFn=self._fallbackStop, after=start_vm)) assign_vnc_port = tasks.Task("assign-vnc-port", self._assignVncPort, reverseFn=self._fallbackStop) start_vnc = tasks.Task("start-vnc", self._startVnc, reverseFn=self._fallbackStop, after=[start_vm, assign_vnc_port]) taskset.add([start_vm, assign_vnc_port, start_vnc]) return self._adaptTaskset(taskset)
def getStartTasks(self): taskset = Device.getStartTasks(self) create_bridges = tasks.Task("create-bridges", self._createBridges, reverseFn=self._fallbackStop) start_vm = tasks.Task("start-vm", self._startVm, reverseFn=self._fallbackStop, after=create_bridges) check_interfaces_exist = tasks.Task("check-interfaces-exist", self._checkInterfacesExist, reverseFn=self._fallbackStop, after=start_vm) for iface in self.interfaceSetAll(): ts = iface.upcast().getStartTasks() ts.prefix(iface).after(check_interfaces_exist) taskset.add(ts) configure_routes = tasks.Task("configure-routes", self._configureRoutes, reverseFn=self._fallbackStop, after=start_vm) assign_vnc_port = tasks.Task("assign-vnc-port", self._assignVncPort, reverseFn=self._fallbackStop) start_vnc = tasks.Task("start-vnc", self._startVnc, reverseFn=self._fallbackStop, after=[start_vm, assign_vnc_port]) taskset.add([create_bridges, start_vm, check_interfaces_exist, configure_routes, assign_vnc_port, start_vnc]) return self._adaptTaskset(taskset)
def getStartTasks(self): taskset = Device.getStartTasks(self) taskset.add(tasks.Task("start", self._startDev)) return taskset