예제 #1
0
    def __init__(self, ssh=None, address=None, username=None, password=None, name='RaccoonSshClient_server', 
            debug=False, usesyshostkeys=True, autoaddmissingkeys=True, pkey=None, autoconnect=True):
            ## ,  # XXX
            ## files=None, path = None, targetname = 'tmpfile', compression='gz'):

        # files, path, targetname and compression shuold be 
        # moved to the respective functions upload() and download()

        DebugObj.__init__(self, debug)

        if ssh:
            self.dprint("parent SSH connection provided: [%s]" % ssh)
            self.ssh = ssh
        else:
            self.dprint("open new SSH connection...")
            self.ssh = RaccoonSshClient(address, username, password, name, debug, 
                usesyshostkeys, autoaddmissingkeys, pkey, autoconnect)
            self.dprint("SSH connection open [%s]" % self.ssh)

        self._ready = False
        self._counter = 0.
        self._total = 0.
        self._STOP = False
        self._running = False
        self.pending = None
        self._status = { 'completed' : False, 'error': None }

        self.test()
예제 #2
0
    def __init__(self, server, name="noname", _format="pdbqt", info=None, debug=False):
        DebugObj.__init__(self, debug)
        self.dprint("init class")
        self.server = server
        self.items = {}
        # NOTE this variable is set automatically
        # by self.upload() and self._readIndex()
        self.path = None

        self.options = {"split": 1000}  # create sub-directories each N ligs

        self.ready = False
        self.info = {
            "name": name,
            "count": 0,
            "date": None,
            "format": _format,
            "index_file": None,
            "comments": "",
            "properties": {},
            "type": None,
        }

        self.filters = {}

        if info:
            self.info = info
            # restore the library obj from an index file
            if self.info["index_file"]:
                self._readIndex()
예제 #3
0
    def __init__(self, server, name = 'noname', _format = 'pdbqt', info = None, debug=False):
        DebugObj.__init__(self, debug)
        self.dprint("init class")
        self.server = server
        self.items = {}
        # NOTE this variable is set automatically 
        # by self.upload() and self._readIndex()
        self.path = None

        self.options = { 'split' : 1000, # create sub-directories each N ligs
                    }

        self.ready = False
        self.info = { 'name'   : name,
                      'count'  : 0,
                      'date'   : None,
                      'format' : _format,
                      'index_file': None,
                      'comments': "",
                      'properties' : {},
                      'type' : None,
                    }

        self.filters = {}

        if info:
            self.info = info
            # restore the library obj from an index file
            if self.info['index_file']:
                self._readIndex()
예제 #4
0
    def __init__(self, ssh=None, address=None, username=None, password=None, name='RaccoonSshClient_server', 
            debug=False, usesyshostkeys=True, autoaddmissingkeys=True, pkey=None, autoconnect=True):
            ## ,  # XXX
            ## files=None, path = None, targetname = 'tmpfile', compression='gz'):

        # files, path, targetname and compression shuold be 
        # moved to the respective functions upload() and download()

        DebugObj.__init__(self, debug)

        if ssh:
            self.dprint("parent SSH connection provided: [%s]" % ssh)
            self.ssh = ssh
        else:
            self.dprint("open new SSH connection...")
            self.ssh = RaccoonSshClient(address, username, password, name, debug, 
                usesyshostkeys, autoaddmissingkeys, pkey, autoconnect)
            self.dprint("SSH connection open [%s]" % self.ssh)

        self._ready = False
        self._counter = 0.
        self._total = 0.
        self._STOP = False
        self._running = False
        self.pending = None
        self._status = { 'completed' : False, 'error': None }

        self.test()
예제 #5
0
    def __init__(self, address=None, username=None, password=None, name='RaccoonSshClient_server', 
                debug=False, usesyshostkeys=True, autoaddmissingkeys=True, 
                pkey=None, autoconnect=False):
        
        DebugObj.__init__(self, debug)

        self.autoaddmissingkeys = autoaddmissingkeys
        self.usesyshostkeys = usesyshostkeys
        self.address = address
        self.username = username
        self.password = password
        self.name = name
        self.pkey = pkey
        self.connection = None
        self.connectiontime = None
        if autoconnect:
            self.openconnection()
예제 #6
0
    def __init__(self, address=None, username=None, password=None, name='RaccoonSshClient_server', 
                debug=False, usesyshostkeys=True, autoaddmissingkeys=True, 
                pkey=None, autoconnect=False):
        
        DebugObj.__init__(self, debug)

        self.autoaddmissingkeys = autoaddmissingkeys
        self.usesyshostkeys = usesyshostkeys
        self.address = address
        self.username = username
        self.password = password
        self.name = name
        self.pkey = pkey
        self.connection = None
        self.connectiontime = None
        if autoconnect:
            self.openconnection()