예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
    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
예제 #4
0
    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