def get_bucket_props(self, bucket): """ Serialize bucket property request and deserialize response """ req = riak_pb.RpbGetBucketReq() req.bucket = bucket.name msg_code, resp = self._request(MSG_CODE_GET_BUCKET_REQ, req, MSG_CODE_GET_BUCKET_RESP) return self._decode_bucket_props(resp.props)
async def get_bucket_props(self, bucket): ''' Serialize bucket property request and deserialize response ''' req = riak_pb.RpbGetBucketReq() req.bucket = str_to_bytes(bucket.name) self._add_bucket_type(req, bucket.bucket_type) msg_code, resp = await self._request(messages.MSG_CODE_GET_BUCKET_REQ, req, messages.MSG_CODE_GET_BUCKET_RESP) return self._decode_bucket_props(resp.props)
def get_bucket_props(self, bucket): """ Serialize bucket property request and deserialize response """ req = riak_pb.RpbGetBucketReq() req.bucket = bucket.name msg_code, resp = self._request(MSG_CODE_GET_BUCKET_REQ, req, MSG_CODE_GET_BUCKET_RESP) props = {} if resp.props.HasField('n_val'): props['n_val'] = resp.props.n_val if resp.props.HasField('allow_mult'): props['allow_mult'] = resp.props.allow_mult return props