Exemplo n.º 1
0
    def __init__(
        self,
        instance: EdenInstance,
        dry_run: bool,
        mount_table: Optional[mtab.MountTable] = None,
        fs_util: Optional[filesystem.FsUtil] = None,
        proc_utils: Optional[proc_utils_mod.ProcUtils] = None,
        kerberos_checker: Optional[check_kerberos.KerberosChecker] = None,
        out: Optional[ui.Output] = None,
    ) -> None:
        self.dry_run = dry_run
        out = out if out is not None else ui.get_output()
        if dry_run:
            self.fixer = DryRunFixer(out)
        else:
            self.fixer = ProblemFixer(out)

        super().__init__(
            instance,
            tracker=self.fixer,
            mount_table=mount_table,
            fs_util=fs_util,
            proc_utils=proc_utils,
            kerberos_checker=kerberos_checker,
            out=out,
        )
Exemplo n.º 2
0
 def __init__(
     self,
     instance: EdenInstance,
     tracker: ProblemTracker,
     mount_table: Optional[mtab.MountTable] = None,
     fs_util: Optional[filesystem.FsUtil] = None,
     proc_utils: Optional[proc_utils_mod.ProcUtils] = None,
     out: Optional[ui.Output] = None,
 ) -> None:
     self.instance = instance
     self.tracker = tracker
     self.mount_table = mount_table if mount_table is not None else mtab.new()
     self.fs_util = fs_util if fs_util is not None else filesystem.LinuxFsUtil()
     self.proc_utils = proc_utils if proc_utils is not None else proc_utils_mod.new()
     self.out = out if out is not None else ui.get_output()