예제 #1
0
    def sync_create_bucket(self, server, bucket):
        """Synchronously creates the default bucket

        Parameters:
            bucket_params - a dictionary containing bucket creation parameters. (Dict)
        Returns:
            BucketCreateTask - A task future that is a handle to the scheduled task."""
#         bucket_params['bucket_name'] = 'default'
        _task = conc.BucketCreateTask(server, bucket, task_manager=self.task_manager)
        self.task_manager.schedule(_task)
        return _task.get_result()
예제 #2
0
파일: cluster.py 프로젝트: umang-cb/Jython
    def async_create_standard_bucket(self, name, port, bucket_params):
        """Asynchronously creates a standard bucket
        Parameters:
            bucket_params - A dictionary containing a list of bucket creation parameters. (Dict)
        Returns:
            BucketCreateTask - A task future that is a handle to the scheduled task."""

        bucket_params['bucket_name'] = name
        bucket_params['port'] = port
        _task = conc.BucketCreateTask(bucket_params,
                                      task_manager=self.task_manager)
        self.task_manager.schedule(_task)
        return _task
예제 #3
0
파일: cluster.py 프로젝트: umang-cb/Jython
    def async_create_sasl_bucket(self, name, password, bucket_params):
        """Asynchronously creates a sasl bucket

        Parameters:
            bucket_params - a dictionary containing bucket creation parameters. (Dict)

        Returns:
            BucketCreateTask - A task future that is a handle to the scheduled task."""
        bucket_params['bucket_name'] = name
        bucket_params['password'] = password
        _task = conc.BucketCreateTask(bucket_params,
                                      task_manager=self.task_manager)
        self.task_manager.schedule(_task)
        return _task