def __init__(self, conf): Platform.__init__(self, "cluster", conf) if "files_url" not in self._conf: raise MissingConfigParamError("files_url") url = urlparse(self._conf["files_url"]) self._files_scheme = url.scheme self._files_host = url.netloc if self._files_scheme not in ["ssh", "file", "rsync"]: raise Exception("Unsupported scheme: {}".format(self._files_scheme)) self._remote_path = self._conf.get("remote_path", self._work_path) self._projects_path = self._conf.get("projects_path", os.path.join(self._work_path, "projects")) self._rsync_path = self._conf.get("rsync_path", "rsync")
def __init__(self, conf): Platform.__init__(self, "cluster", conf) if "files_url" not in self._conf: raise MissingConfigParamError("files_url") url = urlparse(self._conf["files_url"]) self._files_scheme = url.scheme self._files_host = url.netloc if self._files_scheme not in ["ssh", "file", "rsync"]: raise Exception("Unsupported scheme: {}".format( self._files_scheme)) self._remote_path = self._conf.get("remote_path", self._work_path) self._projects_path = self._conf.get( "projects_path", os.path.join(self._work_path, "projects")) self._rsync_path = self._conf.get("rsync_path", "rsync")
def __init__(self, conf): Platform.__init__(self, "local", conf)