예제 #1
0
 def update(self, path, data=None, json=None, headers=DEFAULT_HEADERS, guard_response=None):
     self.init_request()
     self.request = async_execute(self.catalog.put,
                                  [path, data, json, headers, guard_response],
                                  self.rid,
                                  self.success_callback,
                                  self.error_callback)
예제 #2
0
 def query(self):
     self.init_request()
     self.request = async_execute(self.catalog.get_authn_session,
                                  [],
                                  self.rid,
                                  self.success_callback,
                                  self.error_callback)
예제 #3
0
 def query(self, path):
     self.init_request()
     self.request = async_execute(self.catalog.get,
                                  [path],
                                  self.rid,
                                  self.success_callback,
                                  self.error_callback)
예제 #4
0
 def run(self, file_path, working_dir=os.getcwd(), env=None):
     self.init_request()
     self.request = async_execute(self._execute,
                                  [self.executable, file_path, working_dir, self.proc_output_path, env],
                                  self.rid,
                                  self.success_callback,
                                  self.error_callback)
예제 #5
0
 def retrieve(self,
              path,
              headers=DEFAULT_HEADERS,
              destfile=None,
              progress_callback=None):
     self.init_request()
     self.file_path = os.path.abspath(destfile)
     self.request = async_execute(
         self.store.get_obj, [path, headers, destfile, progress_callback],
         self.rid, self.success_callback, self.error_callback)
예제 #6
0
 def upload(self,
            path,
            file_path,
            update_state,
            headers=DEFAULT_HEADERS,
            md5=None,
            sha256=None,
            content_type=None,
            content_disposition=None,
            chunked=False,
            chunk_size=DEFAULT_CHUNK_SIZE,
            create_parents=True,
            allow_versioning=True,
            callback=None):
     self.init_request()
     self.update_state = update_state
     self.request = async_execute(self.store.put_loc, [
         path, file_path, headers, md5, sha256, content_type,
         content_disposition, chunked, chunk_size, create_parents,
         allow_versioning, callback
     ], self.rid, self.success_callback, self.error_callback)
예제 #7
0
 def scan(self, path):
     self.init_request()
     self.request = async_execute(self.uploader.scanDirectory, [path],
                                  self.rid, self.success_callback,
                                  self.error_callback)
예제 #8
0
 def update_config(self):
     self.init_request()
     self.request = async_execute(self.uploader.getUpdatedConfig, [],
                                  self.rid, self.success_callback,
                                  self.error_callback)
예제 #9
0
 def upload(self, status_callback=None, file_callback=None):
     self.init_request()
     self.request = async_execute(self.uploader.uploadFiles,
                                  [status_callback, file_callback],
                                  self.rid, self.success_callback,
                                  self.error_callback)
예제 #10
0
 def start(self):
     async_execute(self.task)