Ejemplo n.º 1
0
    def __init__(self,
                 local,
                 remote,
                 dry_run=False,
                 jobs=None,
                 cleanup_cmds=None,
                 remove_remote_files_dirs=False):

        self.local = local
        self.remote = remote
        self._open_logger()
        self.dry_run = dry_run
        self.jobs = jobs
        if cleanup_cmds:
            self.cleanup_cmds = cleanup_cmds
        else:
            self.cleanup_cmds = []
        self.remove_remote_files_dirs = remove_remote_files_dirs

        self.explorer = core.Explorer(self.local.target_host,
                                      self.local,
                                      self.remote,
                                      jobs=self.jobs)
        self.manifest = core.Manifest(self.local.target_host, self.local)
        self.code = core.Code(self.local.target_host, self.local, self.remote)
Ejemplo n.º 2
0
    def __init__(self, local, remote, dry_run=False):

        self.local = local
        self.remote = remote
        self.log = logging.getLogger(self.local.target_host)
        self.dry_run = dry_run

        self.explorer = core.Explorer(self.local.target_host, self.local,
                                      self.remote)
        self.manifest = core.Manifest(self.local.target_host, self.local)
        self.code = core.Code(self.local.target_host, self.local, self.remote)
Ejemplo n.º 3
0
    def __init__(self, local, remote, dry_run=False, jobs=None):

        self.local = local
        self.remote = remote
        self._open_logger()
        self.dry_run = dry_run
        self.jobs = jobs

        self.explorer = core.Explorer(self.local.target_host,
                                      self.local,
                                      self.remote,
                                      jobs=self.jobs)
        self.manifest = core.Manifest(self.local.target_host, self.local)
        self.code = core.Code(self.local.target_host, self.local, self.remote)
Ejemplo n.º 4
0
    def __init__(self, context):

        self.context = context
        self.log = logging.getLogger(self.context.target_host)

        # For easy access
        self.local = context.local
        self.remote = context.remote

        # Initialise local directory structure
        self.local.create_directories()
        # Initialise remote directory structure
        self.remote.create_directories()

        self.explorer = core.Explorer(self.context.target_host, self.local,
                                      self.remote)
        self.manifest = core.Manifest(self.context.target_host, self.local)
        self.code = core.Code(self.context.target_host, self.local,
                              self.remote)
Ejemplo n.º 5
0
    def __init__(self, context):

        self.context = context
        self.log = logging.getLogger(self.context.target_host)

        # Initialise local directory structure
        self.context.local.create_files_dirs()
        # Initialise remote directory structure
        self.context.remote.create_files_dirs()

        self.explorer = core.Explorer(self.context.target_host,
                                      self.context.local, self.context.remote)
        self.manifest = core.Manifest(self.context.target_host,
                                      self.context.local)
        self.code = core.Code(self.context.target_host, self.context.local,
                              self.context.remote)

        # Add switch to disable code execution
        self.dry_run = False