#NEWLINE# def bucket_create( self , name , bucket_type = 'couchbase' , bucket_password = '' , replicas = 0 , ram_quota = 1024 , flush_enabled = False ) : #NEWLINE# #INDENT# '\n        Create a new bucket\n\n        :param string name: The name of the bucket to create\n        :param string bucket_type: The type of bucket to create. This\n            can either be `couchbase` to create a couchbase style\n            bucket (which persists data and supports replication) or\n            `memcached` (which is memory-only and does not support\n            replication).\n        :param string bucket_password: The bucket password. This can be\n            empty to disable authentication. This can be changed later on\n            using :meth:`bucket_update`\n        :param int replicas: The number of replicas to use for this\n            bucket. The maximum number of replicas is currently 3.\n            This setting can be changed via :meth:`bucket_update`\n        :param int ram_quota:\n            The maximum amount of memory (per node) that this bucket\n            may use, in megabytes. The minimum for this value is 100.\n            This setting may be changed via :meth:`bucket_update`.\n        :param bool flush_enabled:\n            Whether the flush API is enabled. When the flush API is\n            enabled, any client connected to the bucket is able to\n            clear its contents. This may be useful in development but\n            not recommended in production. This setting may be changed\n            via :meth:`bucket_update`\n        :return: A :class:`~.HttpResult`\n        :raise: :exc:`~.HTTPError` if the bucket could not be created.\n        ' #NEWLINE# params = { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'type' : bucket_type , #NEWLINE# 'authType' : 'sasl' , #NEWLINE# 'saslPassword' : ( bucket_password if self else '' ) , #NEWLINE# 'flush_enabled' : int ( flush_enabled ) , #NEWLINE# 'ramQuotaMB' : ram_quota , #NEWLINE# #UNINDENT# } #NEWLINE# if ( bucket_type in ( 'couchbase' , 'membase' ) ) : #NEWLINE# #INDENT# params [ 'replicaNumber' ] = replicas #NEWLINE# #UNINDENT# return self . http_request ( path = '/pools/default/buckets' , method = 'POST' , content = self . _mk_formstr ( params ) , content_type = 'application/x-www-form-urlencoded' )