Skip to content

Commit d3beffc

Browse files
stevewatanabedave-finlay
authored andcommitted
MB-48438 [BP] Add bucketType to terse bucket info
Backporting change for MB-46625 to add the bucketType to the results of the terse bucket info. $ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/memcBucket \ | jq | grep bucketType "bucketType": "memcached", $ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/travel-sample \ | jq | grep bucketType "bucketType": "membase", $ curl -s -u Administrator:asdasd localhost:9000/pools/default/b/ephBucket \ | jq | grep bucketType "bucketType": "ephemeral", Change-Id: I2ad19b9c3f056315b21c79463ce6f00a3b9d014e Reviewed-on: http://review.couchbase.org/c/ns_server/+/161435 Well-Formed: Restriction Checker Well-Formed: Build Bot <[email protected]> Tested-by: Steve Watanabe <[email protected]> Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Finlay <[email protected]>
1 parent f09935e commit d3beffc

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/bucket_info_cache.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ node_bucket_info(Node, Config, Snapshot, Bucket, BucketUUID, BucketConfig) ->
184184
build_short_bucket_info(Id, BucketConfig, Snapshot) ->
185185
BucketUUID = ns_bucket:uuid(Id, Snapshot),
186186
[build_name_and_locator(Id, BucketConfig),
187+
{bucketType, ns_bucket:external_bucket_type(BucketConfig)},
187188
{uuid, BucketUUID},
188189
{uri, build_pools_uri(["buckets", Id], BucketUUID)},
189190
{streamingUri, build_pools_uri(["bucketsStreaming", Id], BucketUUID)},

src/menelaus_web_buckets.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ build_bucket_info(Id, Ctx, InfoLevel, MayExposeAuth, SkipMap) ->
246246
[bucket_info_cache:build_vbucket_map(
247247
menelaus_web_node:get_local_addr(Ctx), BucketConfig)
248248
|| not SkipMap],
249-
{bucketType, ns_bucket:external_bucket_type(BucketConfig)},
250249
{authType, misc:expect_prop_value(auth_type, BucketConfig)},
251250
{localRandomKeyUri,
252251
bucket_info_cache:build_pools_uri(["buckets", Id, "localRandomKey"])},

0 commit comments

Comments
 (0)