示例#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
    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
    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