env = "PATH=$PATH:${EXP_HOME}/ccnx/bin"
+ # BASH command -> ' ccndstart 2>&1 ; ccndc add ccnx:/ udp host ; ccnr 2>&1 '
command = "ccndstart 2>&1 ; "
peers = map(lambda peer: "ccndc add ccnx:/ udp %s" % peer, peers)
command += " ; ".join(peers) + " ; "
rm.deploy()
rm.start_with_conditions()
- # Only if the RM has STOP consitions we
+ # Only if the RM has STOP conditions we
# schedule a stop. Otherwise the RM will stop immediately
if rm.conditions.get(ResourceAction.STOP):
rm.stop_with_conditions()
ResourceFactory.register_type(rclass)
def find_types():
- search_path = os.environ.get("NECO_SEARCH_PATH", "")
+ search_path = os.environ.get("NEPI_SEARCH_PATH", "")
search_path = set(search_path.split(" "))
import neco.resources
if not self.pid or not self.ppid:
failed = True
- (out, chkerr), proc = self.node.check_output(self.app_home, 'stderr')
+ (out, chkerr), proc = self.node.check_output(self.app_home, 'stderr')
- if failed or out or chkerr:
- # check if execution errors occurred
- msg = " Failed to start command '%s' " % command
- out = out
- if err:
- err = err
- elif chkerr:
- err = chkerr
+ if failed or out or chkerr:
+ # check if execution errors occurred
+ msg = " Failed to start command '%s' " % command
+ out = out
+ if err:
+ err = err
+ elif chkerr:
+ err = chkerr
- self.error(msg, out, err)
+ self.error(msg, out, err)
- msg2 = " Setting state to Failed"
- self.debug(msg2)
- self._state = ResourceState.FAILED
+ msg2 = " Setting state to Failed"
+ self.debug(msg2)
+ self._state = ResourceState.FAILED
- raise RuntimeError, msg
+ raise RuntimeError, msg
def stop(self):
command = self.get('command') or ''