def execute(self, name, command): """executes the command on the named host""" if name in ["localhost"]: r = '\n'.join(Shell.sh("-c", command).split()[-1:]) else: r = '\n'.join(Shell.ssh(name, command).split()[-1:]) return r
def start(self): """ Starts the cloudmesh_job process in the background. """ for key in ['dbpath', 'logpath']: path = os.dirname(self.config[key]) Shell.mkdir(path) r = Shell.sh("mongod", "--fork", "--logpath", self.config['logpath'], "--prot", self.config['port'], '--dbpath', self.config['dbpath']) print(r) # TODO # get the id from r self.config['id'] = None # put here the real id
def start(self): """ Starts the cloudmesh_job process in the background. """ for key in ['dbpath', 'logpath']: path = os.dirname(self.config[key]) Shell.mkdir(path) r = Shell.sh("mongod", "--fork", "--logpath", self.config['logpath'], "--prot", self.config['port'], '--dbpath', self.config['dbpath']) print (r) # TODO # get the id from r self.config['id'] = None # put here the real id