def snapshot_report(report): #create permanent dir dir_source = os.path.join(Dirname.reportprepare(report.creator), report.folder) dir_target = os.path.join(Dirname.report(report), 'latest') _copy_dir(dir_source, dir_target, remove=False) #create tagged dir, if there is any tag if report.tag_name: dir_source = os.path.join(Dirname.reportprepare(report.creator), report.folder) dir_target = Dirname.report_with_tag(report) _copy_dir(dir_source, dir_target, remove=False) dir_reportroot = Dirname.reportroot(report.creator) _grantaccess(report.creator, dir_reportroot, acl='rX')
def snapshot_report(report): dir_source = os.path.join(Dirname.reportprepare(report.creator), report.folder) dir_target = Dirname.report(report) _copy_dir(dir_source, dir_target, remove = False) dir_reportroot = Dirname.reportroot(report.creator) _grantaccess(report.creator, dir_reportroot, acl = 'rX')
def mkdir_reportprepare(user): dir_reportprepare = Dirname.reportprepare(user) _mkdir(dir_reportprepare, uid = user.profile.userid, gid = user.profile.groupid)
def check_reportprepare(user): dir_reportprepare = Dirname.reportprepare(user) assert os.path.exists(dir_reportprepare), "Folder %s does not exist" % dir_reportprepare
def mkdir_reportprepare(user): dir_reportprepare = Dirname.reportprepare(user) _mkdir(dir_reportprepare, uid=user.profile.userid, gid=user.profile.groupid)
def check_reportprepare(user): dir_reportprepare = Dirname.reportprepare(user) assert os.path.exists( dir_reportprepare), "Folder %s does not exist" % dir_reportprepare
def check_reportprepare(user): dir_reportprepare = Dirname.reportprepare(user)