rm = self.get_resource(guid)
self.schedule("0s", rm.start_with_conditions)
+ if rm.conditions.get(ResourceAction.STOP):
+ # Only if the RM has STOP conditions we
+ # schedule a stop. Otherwise the RM will stop immediately
+ self.schedule("0s", rm.stop_with_conditions)
+
if wait_all_ready and new_group:
# Schedule a function to check that all resources are
# READY, and only then schedule the start.
if not wait_all_ready:
self.schedule("0s", rm.start_with_conditions)
- if rm.conditions.get(ResourceAction.STOP):
- # Only if the RM has STOP conditions we
- # schedule a stop. Otherwise the RM will stop immediately
- self.schedule("0s", rm.stop_with_conditions)
+ if rm.conditions.get(ResourceAction.STOP):
+ # Only if the RM has STOP conditions we
+ # schedule a stop. Otherwise the RM will stop immediately
+ self.schedule("0s", rm.stop_with_conditions)
def release(self, guids = None):
""" Releases all ResourceManagers in the guids list.
# Author: Alina Quereilhac <alina.quereilhac@inria.fr>
from nepi.execution.attribute import Attribute, Flags, Types
-from nepi.execution.resource import clsinit_copy, failtrap
+from nepi.execution.resource import clsinit_copy
from nepi.resources.linux.application import LinuxApplication
from nepi.util.timefuncs import tnow
super(LinuxTraceroute, self).__init__(ec, guid)
self._home = "traceroute-%s" % self.guid
- @failtrap
- def deploy(self):
+ def do_deploy(self):
if not self.get("command"):
self.set("command", self._start_command)
if not self.get("depends"):
self.set("depends", "traceroute")
- super(LinuxTraceroute, self).deploy()
+ super(LinuxTraceroute, self).do_deploy()
@property
def _start_command(self):